RuiVP Posted January 20, 2022 Share Posted January 20, 2022 HI, I developed a site in a local machine and now I transposed it to a server. Until now everything seems to work fine. However, there is a problem on edit mode: I can change the fields, save them, but when i click the «view» button, it directs to https://localhost/somepage (which goes no where) instead of https://mysite.org/somepage The only way to get back on track is to handwrite the right address on the address bar of the browser. In config.php I have: $config->dbHost = 'localhost'; $config->dbName = 'xxxxxx'; $config->dbUser = 'xxxxxx'; $config->dbPass = 'xxxxxx'; $config->dbPort = '3306'; and $config->httpHosts = array('localhost'); What should I do to get the base address all the time? Link to comment Share on other sites More sharing options...
RuiVP Posted January 20, 2022 Author Share Posted January 20, 2022 OK, I already figured out I should replace 'localhost' with 'mysite.org', (The problem was that on first try to solve, I wrote 'https://mysite.org') And I put on the config->httpHosts = array('localhost', 'mysite.org'); or should I write array('localhost', 'https://mysite.org', 'http://mysite.org') ? or should I change the order? I don't know exactly how to do it (I simply try by error and success), but I already understood that with certain configurations, ckeditor, for example, looses track of mystyles.js. Link to comment Share on other sites More sharing options...
ryan Posted January 20, 2022 Share Posted January 20, 2022 @bilioso You don't want the scheme in the httpHosts array, so you just want [ 'localhost', 'mysite.org' ]; or [ 'localhost', 'mysite.org', 'www.mysite.org' ]; Link to comment Share on other sites More sharing options...
RuiVP Posted January 20, 2022 Author Share Posted January 20, 2022 Many thanks, Ryan. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now