apache - Redirect ?lang=en string to subfolder /en -
I want to redirect as many as this pattern:
For example: all links to You can use these rules in your root change domain com / xxx /? Lang = en to
domain.com/en/xxx/
Domains. Com / About /? Lang = en to
domain.com/en/about/
* /? Lang = en > code> just one goal.
rewrite% {QUERY_STRING} ^ lang = en RewriteRule ^ en / about /? [R = 301, L]
.htaccess :
rewinding sign on rewrite% {THE_REQUEST} \ s / + ([^ /] + \ / \? Lang = ([^ \ s & amp; +++] [NC] rewritable ^ /% 2 /% 1? [R = 302, L] Revoked% {REQUEST_FILENAME}! -d Rewrite% {REQUEST_FILENAME}! -f Riveritium ^ ([ed] {2}) / ([^ /] +) /? $$ 2? Once the code is working properly, LAN = $ 1 [L, QSA]
302 to
301 once.
Comments
Post a Comment