Skip to content

Htaccess Redirect With Query String TO File In A Different Directory

Htaccess Redirect With Query String TO File In A Different Directory

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^video.php https://domain.name/folder1/folder2%{REQUEST_URI} [R=302,NC]
</IfModule>
#if your query strnig is as such, index.php?q=1&b=2
#then %{REQUEST_URI} will create the url like so https://domain.name/folder1/folder2/index.php?q=1&b=2
 
Enjoyed the content ? Share it with your friends !
Published inWeb Server

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *