Reputation: 769
Let's say, I have a simple URL like /page/subpage/ and I want it (and it's subpages) to be fully accessible via /en/page/subpage/. What rewrite rules should I apply here? Already tried:
RewriteCond %{REQUEST_URI} !/en/page/subpage/$
RewriteRule ^(.*)$ /page/subpage/$1 [L,QSA]
But it redirects every URL, because of ^(.*)$ part.
Upvotes: 0
Views: 36
Reputation: 785491
You can use this simple rule:
RewriteRule ^en/(page/subpage/.*)$ $1 [L,NC]
Upvotes: 2
Reputation: 22841
You should be able to do it as below:
RewriteRule ^en/page/subpage/(.*)$ /page/subpage/$1 [L,QSA]
Upvotes: 1