Shared publicly  - 
 
Has anyone else experienced this problem with Google search results? Google links to my pages with an extra slash after the file name, e.g. heightweight.html/  The effect of this slash is that the page loads, but none of the images load, because the path is screwy, e.g. heightweight.html/dotty.jpg
I'm getting a growing number of complaints about my pages being broken, because Google is linking to the wrong page.
1
Robert Sundling's profile photoChris Swanda's profile photoRob Cockerham's profile photo
8 comments
 
Hmmm, I've never run across that.  Are you seeing this from within the Google search results themselves or during redirects after clicking the link.  Strange indeed none the less.
 
I"ll be darned... I have never seen that before.  If you look at the redirect link from El Goog, they are definitely putting the %2F at the end of the URL.  (See below) 

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&sqi=2&ved=0CGcQFjAA&url=http%3A%2F%2Fwww.cockeyed.com%2Finside%2Fkeg%2Fkeg.html%2F&ei=mwQgUOrdNqT50gH44oHYAg&usg=AFQjCNG1DgNEIvSXPuKD3l2DCtxzMlbczg&sig2=jzJcR2fipbc2H_KrczZMbw

Is cockeyed run on Apache?  Maybe this could help ya... http://www.jampmark.com/web-scripting/5-solutions-to-url-encoded-slashes-problem-in-apache.html
 
Bizarre! Since you're running Apache 2.2, what you could do is work around it by adding a line to your .htaccess file (in your main site directory) that responds with a 301 Moved Permanently whenever a URL ends with ".html/", redirecting to the same URL without the slash. It wouldn't correct the original problem with Google, whatever that was, but would cause Google to re-index everything at the correct URLs instead while also showing the images for your visitors in the meantime, since they too would be redirected. For example:

RedirectMatch permanent (.*)\.html/$ http://www.cockeyed.com$1.html
 
Hey! That worked! The slash has been replaced by a question mark on redirects, but the images load! Thanks Rob!
 
Glad it worked!  Just a guess, but the extra question mark sounds like a possible conflict between mod_alias and mod_rewrite; do you perchance have some RewriteRule lines in your .htaccess file?  If so, remove that new RedirectMatch line and instead add this RewriteRule as the very first rule, immediately after your "RewriteEngine On" line:

RewriteRule ^(.*)\.html/$ http://www.cockeyed.com/$1.html [L,R=301]

If you don't have any existing RewriteRule lines and the question mark was caused by something else, you could still use this anyway to get rid of the question mark.  In that case, remove the new RedirectMatch line, then at very the top of your .htaccess file, add the line

RewriteEngine On

immediately followed by the RewriteRule line above.
 
Thanks for the input +Robert Sundling I haven't admined any apache servers in a long time.  Good info to have.
 
Hm. I don't use rewrite rules in my .htaccess file, but there could be one a little further upstream.
Add a comment...