Reputation: 392
I have this line of code:
RewriteRule ^account/?edit=([A-Za-z]+)$ /?goTo=account&act=edit_$1 [L,NC]
When I go to mysite.com/account/?edit=username
it is supposed to refer to mysite.com?goTo=account&act=edit_username
but it gives me error 404
Any help?
Thanks!
Upvotes: 2
Views: 832
Reputation: 786289
You cannot match QUERY_STRING using RewriteRule
. That requires a RewriteCond
like this:
This should work:
RewriteCond %{QUERY_STRING} (?:^|&)edit=([^&]*) [NC]
RewriteRule ^account/?$ /?goTo=account&act=edit_%1#something [L,NC,NE,QSA]
Upvotes: 2