Redirecting to base URL not working
I'm creating a website for a client and I need people to be able to access it with or without 'www' at the beginning.
I've tried '.htaccess' files and editing the config/site.php file.
I read the error log and apparently it has something to do with concrete5 core files (maybe from a wrong install)...
Anyway, this is what I see in the error log:
[Mon Jan 09 20:50:07 2012] [error] [client xxx.xx.xxx.x] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/concrete/libraries/request.php:51) in /home/user/public_html/concrete/libraries/view.php on line 841 [Mon Jan 09 20:50:07 2012] [error] [client xxx.xx.xxx.x] PHP Warning: strpos() [<a href='function.strpos'>function.strpos</a>]: Empty delimiter in /home/user/public_html/concrete/libraries/request.php on line 51
The URL ishttp://www.manoscreativas.tk (works)
howeverhttp://manoscreativas.tk (doesn't, it just takes me to the default cgi 'thingy')
I'm NOT afraid to play around if I know what I'm doing... so any help is appreciated. Thanks!
even if you type
Try clearing your browser cache and refreshing the page.
You can not have both http://www.manoscreativas.tk and manoscreativas.tk resolve for your site.
As you can see in config.php
You can set it with or without www. but not both
This is the ONLY domain in which it doesn't work.
If you goto eitherhttp://manoscreativas.tk orhttp://www.manoscreativas.tk it is redirecting you to your base_url ofhttp://www.manoscreativas.tk.
This is the correct behaviour for a site. If you have a site visible on 2 different domains (i.e. with and without the www.) then you can be downgraded by google for having duplicate content.
Your site will work with or without the www.. But the visitor will always see the www. in the address bar.
Does that make sense?
I replaced the entire 'concrete' folder and it works now, so I guess there must've been something wrong with my core install.
Anyway, thank you all for your help.