在.htaccess从URL删除Wordhtaccess、URL、Word

由网友(愿不孤寂)分享简介:在搜索的一个多小时,我仍然无法弄清楚如何从 HTTP重定向链接://网站/ FR /其他到的http://网站/其他 我用这code:RewriteEngine叙述上重写规则^ / FR /(.*)$ / $ 1 [L,R = 301,QSA]解决方案 只是删除​​第一个正斜杠:重写规则^ FR /(.*)$ / $...

在搜索的一个多小时,我仍然无法弄清楚如何从 HTTP重定向链接://网站/ FR /其他的http://网站/其他

我用这code:

  RewriteEngine叙述上
重写规则^ / FR /(.*)$ / $ 1 [L,R = 301,QSA]
 

解决方案

只是删除​​第一个正斜杠:重写规则^ FR /(.*)$ / $ 1 [L,R = 301,QSA]

尝试了这一点,在 http://htaccess.madewithlove.be/ 。

wordpress的htaccess文件设置亲测

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/.

阅读全文

相关推荐

最新文章