剥离.htaccess文件中url的结尾

剥离.htaccess文件中url的结尾,url,.htaccess,rewrite,stripping,Url,.htaccess,Rewrite,Stripping,我的站点上有数百个404错误,这些错误是由表达式“URLONCLICK”和“%5C”以某种方式插入到正确url的末尾引起的,我不知道它来自何处,但我只想将其从.htaccess文件中的url末尾删除。我该怎么做 i、 e。 www.mydomain.com/category/post-title/URLONCLICK www.mydomain.com/category/post title/%5C 我想去掉这些URL的结尾,使它们看起来像: www.mydomain.com/category/p

我的站点上有数百个404错误,这些错误是由表达式“URLONCLICK”和“%5C”以某种方式插入到正确url的末尾引起的,我不知道它来自何处,但我只想将其从.htaccess文件中的url末尾删除。我该怎么做

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

我想去掉这些URL的结尾,使它们看起来像: www.mydomain.com/category/post-title/

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\%5c $ $1 [NC]
RewriteRule ^(.*)\URLONCLICK $ $1 [NC]
这应该可以。也许有更好的方法(合并最后两行)