Answer the question
In order to leave comments, you need to log in
How to remove keys from URL?
Hello.
There is a link: gdz2/index.php?id=2
Need to remove the "?id=2" keys.
Preferably the URL should look like this: gdz2/index
I think it can be done with .htaccess, but I have no idea how to do it. ..
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
RewriteCond %{QUERY_STRING} (^|&)id\=2($|&)
RewriteRule ^gdz2/index\.php$ /gdz2/index? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question