Mobile app version of vmapp.org
Login or Join
Megan663

: .htaccess not passing GET parameters 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

@Megan663

Posted in: #301Redirect #Htaccess

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

1 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

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]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme