After more than one hour of searching, I still can't figure out how to redirect a link from http://site/fr/other
to http://site/other
.
I am using this code:
RewriteEngine On
RewriteRule ^/fr/(.*)$ /$1 [L,R=301,QSA]
After more than one hour of searching, I still can't figure out how to redirect a link from http://site/fr/other
to http://site/other
.
I am using this code:
RewriteEngine On
RewriteRule ^/fr/(.*)$ /$1 [L,R=301,QSA]
Just remove the first forward slash:
RewriteRule ^fr/(.*)$ /$1 [L,R=301,QSA]
.Try this out at http://htaccess.madewithlove.be/.
To remove '-xyz-' from the url
To remove 'xyz' from the url 'http://yoursite.com/xyz/some-url.html'
To remove 'xyz' from the url 'http://yoursite.com/some-dir/xyz/some-url.html'