0

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/

1 Answers1

0
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).

cbrandolino
  • 5,873
  • 2
  • 19
  • 27