[solved] site no longer visible at http://www and http:// since cmsms install

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
nickf
New Member
New Member
Posts: 8
Joined: Fri May 09, 2008 9:09 am

[solved] site no longer visible at http://www and http:// since cmsms install

Post by nickf »

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.
Last edited by nickf on Thu May 15, 2008 8:19 am, edited 1 time in total.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am
Location: Stuttgart / Germany

Re: site no longer visible at http://www and http:// since cmsms install

Post by Wiedmann »

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)
Which error?
(even with the above code in htaccess)
Maybe a good idea, to change "[R=301]" to [R=301,L]".
You should also escape the dots in the RewriteCond with a backslash.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: site no longer visible at http://www and http:// since cmsms install

Post by calguy1000 »

and check your config.php
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nickf
New Member
New Member
Posts: 8
Joined: Fri May 09, 2008 9:09 am

Re: site no longer visible at http://www and http:// since cmsms install

Post by nickf »

Hello,

wiedmann - sorry the error is a 301 "Moved Permanently. The document has moved here (with an incorrect link).
Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request."

I added the [R=301,L] ad it works a treat!!!

You should also escape the dots in the RewriteCond with a backslash, do you mean like this?

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


calguy 1000 - when you say check the config.php, please elaborate as I am not sure what to look for.


sorry for my basic questions, I am a css designer not a php coder and some of this cmsms appears to be not so simple for me.


thanks guys!!
Post Reply

Return to “CMSMS Core”