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]
Enter the code below after the Rewrite Engine:on in the .htaccess file on the root of your website directory.
# non-www to www redirect
rewritecond %{http_host} ^ocalainsurance.com
rewriterule ^(.*)$ www.ocalainsurance.com/$1 [r=301,nc]