• Hello,

    many websites (like my one) have problems with multiple-slashes in URLs, what means: http://www.domain.com/this-is-an-article works as well as http://www.domain.com//////this-is-an-article. But when automated links will be generated (just like with paginations) you will get 404 errors. Webmaster Tools from Google lists pretty much 404 reports, that some URLs are not reachable due to this multiple-slashes problem.

    I wanted to use a htaccess-code, which prevents URLs from multiple-slashes, this way:

    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
    RewriteRule . %1/%2 [R=301,L]
    </IfModule>

    This works perfectly! Every URL with // or //// or even more slashes will automatically be corrected to one slash. Unfortunately when using this htaccess code the W3 Total Cache plugin is completly useless. Because every time you visit the cached site and click on a link the complete cache-url appears in the adressbar (“/wp-content/cache/page_enhanced/XXXXXXXX” and so on) instead of the correct url to an article for example.

    Could you please include this htaccess-code somehow within your plugin, so that all multiple-slashes will automatically be corrected WHILE working perfectly with the cache-plugin?

    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
    RewriteRule . %1/%2 [R=301,L]
    </IfModule>

    Regards,

    http://wordpress.org/plugins/w3-total-cache/

  • The topic ‘Prevent multiple-slashes in URLs and compatibility with W3 Total Cache’ is closed to new replies.