重定向大部分的子文件夹(有例外)具有语言的语言文件夹(Redirect most of the su

2019-10-30 01:09发布

我想语言的所有子文件夹重定向到语言文件夹,除了2个网址。 例如 :

http://example.com/es/folder1/
http://example.com/es/folder1/folder2/
except http://example.com/es/terms-of-use/ and http://example.com/es/privacy-policy/

should redirect to http://example.com/es/

我尝试没有成功如下:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/es/terms-of-use/
RewriteCond %{REQUEST_URI} !^/es/privacy-policy/
RewriteRule ^/es/(.+)$ www.example.com/es/ [R=301,L]

你有什么建议吗?

非常感谢提前

文章来源: Redirect most of the subfolders (with exceptions) of a language to the language folder