By jimmyg164 on
Hi
help wanted
in the htaccess file i have set it to redirect from .car99.net to www.car99.net
RewriteCond %{HTTP_HOST} ^car99\.net$ [NC]
RewriteRule ^(.*)$ http://www.car99.net/$1 [L,R=301]
should i also remove the trailing / and if so where should i insert
#get rid of trailing slashes
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
Comments
It's probably good from a
It's probably good from a SEO point of view to normalize whether the "www" prefix is present. (Which way you go is a matter of personal preference; I favor removing it.) I can't see any advantage in stripping out trailing slashes, though. If you want to do it, I don't think your example will work. A Google search for "htaccess rule strip trailing slash" (without the quotes) turns up relevant information. Rewrite directives are processed in the sequence they appear.