URL ends with two brackets following URL rewrite.

MerchantAdvance

New Member
Another one of those complex HTACCESS questions. I've just changed my URL from www to non www using the following:\[code\] RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.contrabang\.com [NC] RewriteRule ^(.*)$ http://contrabang.com/$1 [L,R=301]\[/code\]Everything seemed to be fine. My links all changed from /events.html to /events. But when I typed in my homepage with index.html it didn't change. So I added in the following to .htaccess:\[code\] RewriteEngine On # remove this, if you have it already RewriteCond %{REQUEST_URI} index\.html RewriteRule ^(.*)index\.html$ /$1 [R=301,L] RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.*).html\ HTTP/ RewriteRule .* http://localhost/html/%1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.*)\ HTTP/ RewriteRule .* %1.html [L]\[/code\]Now index.html is removed but in place is two unnecessary brackets. The url is http://contrabang.com
 
Back
Top