Htaccess rewrite with question mark
I have this type of link:
http://www.domain.it/index.php?module=Test&func=Prova
I would do this when I add / en before / index.php
rewrite with
http://www.domain.it/index.php?module=Test&func=Prova&lang=en
I've tried several methods but always rewrite index.php & lang = en Seems to be the problem?
RewriteRule ^(en)/(.*)$ $2&lang=$1 [L,QSA]
but there is nothing to do.
+3
source to share
1 answer
You can try adding these lines to your .htaccess
file:
RewriteEngine On
RewriteRule ^([a-z]{2})/(.*)$ $2?%{QUERY_STRING}&lang=$1 [L]
This will keep the language at $ 1 and start at $ 2, so it can be used from other pages besides index.php
other languages besides en
.
Alternatively, to check these things, you can use sites like this one.
0
source to share