Force "www" in the URL?
Permalink
Hi!
I believe previous versions of Concrete used to force "www" into the website URL, but the new version does not. Is this simply a difference in the htaccess script, or...?
I'm having issues with users who cannot load Ajax content, because whether they use "mysite.com" or "www.mysite.com", the other will not load due to security restrictions.
Any help is appreciated. Thanks!
I believe previous versions of Concrete used to force "www" into the website URL, but the new version does not. Is this simply a difference in the htaccess script, or...?
I'm having issues with users who cannot load Ajax content, because whether they use "mysite.com" or "www.mysite.com", the other will not load due to security restrictions.
Any help is appreciated. Thanks!
explicitly defining the BASE_URL will fix that.
Thanks!
Or you can just add this into your htaccess. This will be quite faster than other option.
# redirect to www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^hostname.com$
RewriteRule (.*)http://www.hostname.com/$1 [R=301,L]
# redirect to www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^hostname.com$
RewriteRule (.*)http://www.hostname.com/$1 [R=301,L]