My Google Webmaster Tools show me hundreds of crawling errors of the following type:
/images/logo.jpg%7C
I can't find the source of the problem as the site seems to work fine so I was thinking if I could write a rewrite condition which alters all this url's to
/images/logo.jpg
This way it would work.
Can this be done with a rewrite condition in htaccess and if how? Any other suggestions?
Try the following:
RewriteEngine On
RewriteRule ^(.*)\|$ /$1 [R=302,L]
This removes the vertical bar character from the end of the URL (any URL). The pipe symbol (vertical bar) needs to be backslash escaped in the regex to negate its special meaning.
Replace the 302
(temporary) with a 301
(permanent) when you are sure it's working OK.