handsun123
asked on
redirect Joomla sites to non www
Help! In my panel at host gator there is an option to do redirects, which works great for my html sites, but the Joomla sites which already have an extensive htaccess file will not redirect through the cpanel functionality. I need to modify the htaccess directly and have tried various code (I don't even know if it matters if it is at the top or the bottom of the htaccess file) this did not work, I had it at the bottom of the page, rewrite engine on is at the top: Thanks, Carin
I would like www to redirect to non-www
Options FollowSymlinks
rewritecond %{http_host} ^www.ocalainsurance.com [nc]
rewriterule ^(.*)$ http://ocalainsurance.com/$1 [r=301,nc]
I would like www to redirect to non-www
Options FollowSymlinks
rewritecond %{http_host} ^www.ocalainsurance.com [nc]
rewriterule ^(.*)$ http://ocalainsurance.com/$1 [r=301,nc]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
so then I found the exact redirect hostgator uses and put it directly under the Rewrite Engine:on and it works!
RewriteCond %{HTTP_HOST} ^www.ocalainsurance.com$
RewriteRule ^/?$ "http\:\/\/ocalainsurance\
I am redirecting to non-www.
thank you!