Answer the question
In order to leave comments, you need to log in
How to intercept a GET request to an existing file via htaccess?
Can you please tell me how can I intercept a certain get request to an existing file and redirect it to another using htaccess?
For example, on request /dir/one.php? get =1 return /dir/two.php? get =1, and for any other request, return the first file as well.
Answer the question
In order to leave comments, you need to log in
RewriteCond %{QUERY_STRING} ^(get=1)$
RewriteRule ^/dir/one.php$ /dir/two.php?%1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question