开发者

Stripping the end of a url in the .htaccess file

I have a problem hundreds of 404 errors on my site that are开发者_运维知识库 caused by the expressions "URLONCLICK" and "%5C" being somehow inserted at the end of the correct url, and I don't know where it is coming from but I want to just strip it off of the end of the url in the .htaccess file. How do I do that?

i.e. www.mydomain.com/category/post-title/URLONCLICK www.mydomain.com/category/post-title/%5C

I want to strip the end off of these urls so they look like: www.mydomain.com/category/post-title/


Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\%5c $ $1 [NC]
RewriteRule ^(.*)\URLONCLICK $ $1 [NC]

This should do. Maybe there is a better way (merging the last two lines).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜