Forum Moderators: Robert Charlton & goodroi
/folder//file.htm 200
I already posted in the apache forum, but further investigations showed, that it's also a theme for this forum.
/folder//file.htm
gives the same page as
/folder/file.htm
both with status 200 OK
But naturaly,
../misc/layout.css
../misc/layout.js
lead not to the right target, so the page does not work normal, since CSS and javascript not loaded.
I tried to find out how to eliminate the problem by .htaccess
My search engine query leaded to a post in an SEO forum.
Here a text from this forum
_____________________________________________________________
A few weeks ago we only were surprised when we discovered requests in our access_log for documents in the directory 'example' folowed by a trailing double slash. Googlebot requested documents as for example: example.com / example // documentname.html.
_____________________________________________________________
It followed some drastic traffic loose from Google.
Could some nice links from competitors like
http://example.com/folder//file.htm
The "almost" nothing, what an other web site can do to Your ranking?
So now questions:
How to detect this problem
How to avoid by some .htaccess settings?
# remove multiple slashes anywhere in url
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . http://www.example.com%1/%2 [R=301,L]
If you haven't already added prevention / fixes for other duplicate problems, you may want to look for these as well:
- non www to www (or the reverse depending which you prefer)
- .com/ and .com/index.html duplicates
- .com./ redirected to .com/ (notice misplaced dot in first example)
- removal of useless query strings (ie. example.com/?junk)
jdMorgan recently wrote a great guide [webmasterworld.com] for pretty much every issue that can arise, including the ones I mentioned and a many others.
It's a lot to go through and customize to your needs, but it's the most complete set of fixes I've ever seen.
If you add the trailing slash to the URL, your forum generates every URL with double slashes! My forum did this for over a year before I figured out what the problem was.