By nvisioncurtis on
Hi All,
It seems that if users enter my site without the www. in the webdomain that certain JS libs don't load correctly in CiviCRM.
My first thought was to use directives in the HTACCESS file to redirect but I'm not sure if this will mess up drupal...
something like this
#Redirect to www location
RewriteEngine on
RewriteBase /
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
Is there a better way to do this? perhaps its already built in?
Comments
It's already built in. From
It's already built in. From the default .htaccess file:
Thank You dstelljes! One more question
I also would like to redirect an alias domain to the real domain. I didn't see any code in there for that specifically.
I think this might work
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Would cause a circular loop?