Site url with www does not connect to the database

edited March 2018 in Installation
Hello,

I uploaded my new site to the live server.

The site works fine when I go to: mysite.com but if I try www.mysite.com it can't connect to the database, it tried to connect to the local server database.

Is there a way to solve this problem without redirecting it in the Cpanel?

Comments

  • edited 4:57PM
    I did the redirect on the cpanel for now, but now editing things on the admin side break with Forbidden error. How do you deal with this issue?
  • edited March 2018
    Removing the redirect from cpanel, I still get the Forbidden error when trying to edit things on the admin side.

    It happens when I try to save a block I edited, that has the google maps code in it (e.g. the iframe you get from google maps)

    In firebug I get this:
    The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.
  • edited 4:57PM
    I'm not quite sure I understand your issue. If it's not working at another domain, then it sounds like you need to configure that domain in your CPanel. If you are getting a forbidden error, it sounds like an .htaccess issue. Try hard coding the base_url in the fuel/application/config/config.php to be "http://www.mysite.com" and following these steps:
    https://www.codeigniter.com/user_guide/installation/troubleshooting.html
  • We did just upgrade the forum and it may require you to reset your password. I would try the following:

    1. Hardcode the $config[‘base_url’] in fuel/application/config/config.php to be www.mysite.co.za
    2. Check your fuel/application/config/environments.php file so that the production URL includes the www
Sign In or Register to comment.