0

I am using PyroCMS 2.1 pro. With multi site manager.

I have a website that I have setup as somedomain.com.au.

It works fine, however when i type in the www. prefix the CMS tells me its not setup.

If I go into the CMS and change the domain to www.somedomain.com.au it works but then doesnt work if we ommit the www.

Should I be redirecting something or have I missed a setting in PyroCMS that I should have set.

2

You can use an .htaccess to redirect one version (for example the not-www) to the other (the www). The following is an example to redirect the not-www version to the www version.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
0

It doesn't matter which you choose, but you have to pick one and stick with it.

If you're looking to use the www prefix, see http://wwwizer.com for an easy way to automatically redirect the naked domain to the www subdomain. This can also be done with Apache rewrite rules, but since it sounds like you're on shared hosting, the other method sounds more reasonable.

If you want to REMOVE the www then you'll need to look both into the redirects, and any options your hosting provider offers you. I know for a fact that many web hosts let you redirect the www using their own tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.