【发布时间】:2018-12-21 15:58:18
【问题描述】:
我有这样的网站:neotel2000.com:
- 西班牙语:neotel2000.com
- 英文:neotel2000.com/en/
- 法语:neotel2000.com/fr/
好的。
我需要这个:
我希望与法语版本 (/fr/) 相关的每个可能部分,都将重定向 (301) 到根域 (neotel2000.com)。示例:
neotel2000.com/fr/whatever/ -----> neotel2000.com
虽然,有一些例外(即有 7 个与 /fr/ 相关的 url,其中 301 重定向不适用)我将向您展示这些 url 例外之一:
https://www.neotel2000.com/fr/standard-virtuel/
到目前为止,我已经在这里和其他论坛搜索了几十个 psot,但都没有运气。
这是我的 .htaccess 文件:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} !^GET\ ./https://www.neotel2000.com/fr/.*\ HTTP
RewriteCond %{THE_REQUEST} !^GET\ ./https://www.neotel2000.com/fr/standard-virtuel/.*\ HTTP
RewriteRule ^fr(.+)/ / [R=301,L]
</IfModule>
谢谢你的加载
【问题讨论】:
标签: .htaccess redirect seo url-redirection