[solved] site no longer visible at http://www and http:// since cmsms install
Posted: Tue May 13, 2008 10:30 pm
I have installed and setup cmsms in the root directory of my client's server - and it appears to be working fine.
Before I added CMSMS to the server, the site could be seen at http://www.... and http://… (non-www).
And in .htaccess I forced any non www page to redirect to a www page to prevent duplicate content in search engines:
# redirect non www to www to prevent duplicate content in search engines
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]
Now (even with the above code in htaccess) with the CMSMS site, if you try the non www version it returns an error. (the www url works fine)
I have this is in config.php:
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.php';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
The ability to type the non www prefix and arrive at the correct page is preferable (as often people don’t type the www prefix in when looking for a site - I know I don’t).
I have lost the ability to do any 301 redirects through htaccess now that cmsms has been installed and its driving my crazy.
Any ideas on how I can make this work?
Perhaps I should turn mod rewrite off and do it manually through htaccess?
Thank you in advance for your help.
Before I added CMSMS to the server, the site could be seen at http://www.... and http://… (non-www).
And in .htaccess I forced any non www page to redirect to a www page to prevent duplicate content in search engines:
# redirect non www to www to prevent duplicate content in search engines
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]
Now (even with the above code in htaccess) with the CMSMS site, if you try the non www version it returns an error. (the www url works fine)
I have this is in config.php:
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.php';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
The ability to type the non www prefix and arrive at the correct page is preferable (as often people don’t type the www prefix in when looking for a site - I know I don’t).
I have lost the ability to do any 301 redirects through htaccess now that cmsms has been installed and its driving my crazy.
Any ideas on how I can make this work?
Perhaps I should turn mod rewrite off and do it manually through htaccess?
Thank you in advance for your help.