Google Top Listing. 

Removing Double Slashes From URLs

I was having a problem with one of my sites where, for reasons unknown, WordPress was inserting an unwanted extra backslash after the domain name. For example,

garyharvey.net//whatever

I searched far and wide for the answer but my online friend Frank of C-4.us has sent me the answer. It’s in this page…

http://www.mydigitallife.info/2008/07/21/redirect-or-rewrite-to-remove-double-or-multiple-slashes-in-url/

In brief, just add this to your .htaccess file…

# Remove multiple slashes anywhere in URL
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]

One Comment on “Removing Double Slashes From URLs”
  1. mike from used mountain bikes 24th July 2009 12:59 am

    Gary what can I say. I luv the plugin and will be converting my own wordpress sites to use Keyword Luv. So many benefits.
    mike@used mountain bikes´s last blog ..Hello world! My ComLuv Profile

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.