如何重定向%E2%80%8E和其他怪异的链接正确的地方? [英] How to redirect %E2%80%8E and other weird links to right place?

查看:348
本文介绍了如何重定向%E2%80%8E和其他怪异的链接正确的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

四,有不少很好的链接,超出我的控制,但链接到的东西,如: http://mywebsite.com/somepage/%E2%80%8E 时,我希望它去只是 HTTP ://mywebsite.com/somepage

iv got quite a few good links that are out of my control but link to things like: http://mywebsite.com/somepage/%E2%80%8E when i want it to go to just http://mywebsite.com/somepage

经常%E2%80%8E被创建时,如果有一个人被链接忘记删除/

often the %E2%80%8E is created if when some one is linking forgets to remove the /

其他的结局我得到的是......

other endings i get are....

/‎&
/‎
& -----added to the end of the link... ie ..root/somepage&

是否有任何htaccess的规则,我可以申请重定向这样的事情在正确的地方?

Are there any htaccess rules i can apply to redirect things like this to the right place?

任何字preSS的插件,将帮助?

Any wordpress plugins that will help?

感谢您

(这是不好的搜索引擎优化BECAUSE 404的页面不计数,并没有通过链接汁)

(THIS IS BAD FOR SEO BECAUSE 404 PAGES ARE NOT COUNTED AND DO NOT PASS LINK JUICE)

我也不要在我的任何网址都性格和放大器;

I also dont in any of my urls have the character &

推荐答案

只是所有其他规则之前,把这个规则 (右下面 RewriteEngine叙述在线):

Just place this rule before all other rules (right below RewriteEngine On line):

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+([^/]+)/.*?[&%] [NC]
RewriteRule ^ /%1 [L,R]

这篇关于如何重定向%E2%80%8E和其他怪异的链接正确的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆