I need a line in my .htaccess which would redirect all URLs that does not end with the trailing dash to one. One of my link builders did a very stupid mistake. She built up links for http://www.jimwestergren.com/v7ndotcom-elursrebmem Instead of http://www.jimwestergren.com/v7ndotcom-elursrebmem/ (the URL I gave) Which is total different URLs by Google. Evidence: http://www.mattcutts.com/blog/seeing-nofollow-links/ PR 5 http://www.mattcutts.com/blog/seeing-nofollow-links PR 0 So the list of PR 3-5 links I got from her are all useless and can only cause damage. Thanks for helping me on this. I could of course just make a 301 on only this example but would be good to make it on all posts for similar links in the future.
Hi! Does that help? .htaccess rewrite rule to add a trailing slash to requested urls Best regards, Tobias
I posted this a couple of weeks ago. Wasn't sure if anyone would ever use it http://forums.digitalpoint.com/showthread.php?t=48460
Thanks a lot both of you. These lines were the solution: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ http://www.jimwestergren.com/$1/ [L,R=301] My .htaccess file is now 9,52 KB big, I hope it does not slow down the site ... I will blog soon about this, it is vital for all wordpress users.
I'm confused ... doesn't the web server do the redirect for you automatically? MSN and Yahoo drop trailing slashes from their SERP results, so in my web logs, I see this type of stuff all the time. I'm running Apache as a web server. So ideally it should be taken care of automatically ... although I've always wondering if the internal algorithms of the search engines realize this - yea, best to fix at the source if at all possible.
This is only problematic if not the webserver but a script that is not written with that in mind handles the request. Normally the webserver would do the redirect automatically. I don't know why this only affects MSN and Yahoo(but not Google), probably they have some other heuristics (nice word, I like it. Doesn't describe what it means, just some fuzzy functionality). Tobias