User Tools

Site Tools


This is an old revision of the document!

Sometimes and can react as different domains. If you type in your URL using the www prefix but you have your site's baseurl defined without the the www prefix in the "includes/" file, it can cause potential issues such as logging a user out because it's recognizing your site url with the www prefix and a non-www prefix as different domains.

You can force the WWW prefix to be included in your domain URL so your site doesn't create any potential conflicts as being viewed as 2 different domains with WWW and non-WWW prefixes.

Open your .htaccess file and add the following code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [R=301,L] 

Just make sure that you replace the with your actual domain name. If you're going to force the www prefix in your .htaccess file, in your includes/ file also make sure your baseurl is defined with the www prefix.

define('_BASEURL_','');// protocol required (http:// )
site_www_prefix_issues.1463501593.txt.gz · Last modified: 2016/05/17 16:13 by admin