.htaccess does not listen to me! What's the matter?
For some reason I have double slashes in my URLs, couldn't find the reason for happening. 

As a short term solution I want to use htaccess to remove double slashes in URLs. 

Currently I have this code as htaccess:

	DirectoryIndex index.php
	<IfModule mod_rewrite.c>
	RewriteEngine On

	# remove double slashes
	RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
	RewriteRule . %1/%2 [R=301,L]

	# redirect http:// to http://www
	RewriteCond %{HTTP_HOST} ^domain.com
	RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

	# custom permalink structure
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

	</IfModule>

But for some odd reason, removing double slashes does not work.

What's the reason for it not working? I already tried repositioning the code, didn't work.

Really need help quickly. I don't want Google to index URLs with double slashes.


.htaccess does not listen to me! What's the matter?
===

For some reason I have double slashes in my URLs, couldn't find the reason for happening. 

As a short term solution I want to use htaccess to remove double slashes in URLs. 

Currently I have this code as htaccess:

	DirectoryIndex index.php
	<IfModule mod_rewrite.c>
	RewriteEngine On

	# remove double slashes
	RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
	RewriteRule . %1/%2 [R=301,L]

	# redirect http:// to http://www
	RewriteCond %{HTTP_HOST} ^domain.com
	RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

	# custom permalink structure
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

	</IfModule>

But for some odd reason, removing double slashes does not work.

What's the reason for it not working? I already tried repositioning the code, didn't work.

Really need help quickly. I don't want Google to index URLs with double slashes.

