There seems to be some misleading info out there on the best way to redirect the domains.
What would be the best way to redirect http://www.domain.com/ to http://domain.com/
I saw the following in another host's tutorial on using the cpanel 301 redirect applet:
Warning: Never create a redirect for domain.com to www.domain.com or from domain.com to domain.com/index.something. Doing either will cause an infinite loop. If you need to control the www and index page, you must use mod_rewrite by adding .htaccess code.
Which would suggest something like this?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
A bit confusing for the coding challenged....
Frankly, I see it as virtually irrelevant since the vast majority of searches are through search engines, but I guess I'm a bit of a perfectionist....
What would be the best way to redirect http://www.domain.com/ to http://domain.com/
I saw the following in another host's tutorial on using the cpanel 301 redirect applet:
Warning: Never create a redirect for domain.com to www.domain.com or from domain.com to domain.com/index.something. Doing either will cause an infinite loop. If you need to control the www and index page, you must use mod_rewrite by adding .htaccess code.
Which would suggest something like this?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
A bit confusing for the coding challenged....
Frankly, I see it as virtually irrelevant since the vast majority of searches are through search engines, but I guess I'm a bit of a perfectionist....