2

I have a .htaccess file that looks like this:

RewriteEngine on
RewriteRule ^login$ /login.php? [L,R=301]

However when I do any get parameters such as /login?random=get&params=true they don't get passed through to the login.php file. How can I fix this?

3

RewriteRule ^login$ /login.php? [L,R=301]

You need to remove the ? on the end of the RewriteRule substitution. This is effectively creating an empty query string, removing anything that is passed in the request.

RewriteRule ^login$ /login.php [L,R=301]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.