I have an web application in PHP with urls like this:
https://www.domain.com/?mod=test&act=view
My problem is that when I try to use mod_rewrite to redirect users to new link:
https://www.domain.com/view-test
I have the following rule under my .htaccess:
RewriteRule ^\?mod=test&act=view$ /view-test [L,R=301]
If I remove the leading “?” from the above rule the redirection works but obsiouly I get a 404 error. But if I keep it nothing happens
Can anyone help?
You can create a new rule for
view-test:Update:
This works perfectly for me:
Get the values:
Output:
Hope this helps!!