Answer the question
In order to leave comments, you need to log in
How to shorten links with .htaccess?
I have a link like this
mysite/about?language=ru
instead of about there may be other words
I'm trying to shorten it with htaccess:
RewriteRule about?language=([0-9-]+)/([0-9-]+)/([a-z0 -9-]+) about/$1 but the link is not shortened.
Where is the mistake?
Answer the question
In order to leave comments, you need to log in
GET is not part of the url
RewriteCond %{QUERY_STRING} (^|&)language\=ru($|&)
RewriteRule ^(.+)$ /%1? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question