Hompage stylesheet linked to local server name

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.
Locked
JQ

Hompage stylesheet linked to local server name

Post by JQ »

When I acces my site via www.mysite.com, the stylesheet is linked to http://localservername/stylesheet.php?templateid=1, so it doesnt work from the public internet....
BUT when I use the link http://www.mysite.com/index.php?page=Home, it has the correct stylesheet link (/stylesheet.php?templateid=1), so it works fine from the public internet

Help!

Thanks!
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Hompage stylesheet linked to local server name

Post by Ted »

The problem is that the {stylesheet} tag gives out full absolute URLs based on the URL in config.php.  There isn't really a way to do relative paths at the moment, but it's come up in the past and I should probably look into it...
JQ

Re: Hompage stylesheet linked to local server name

Post by JQ »

wishy wrote: The problem is that the {stylesheet} tag gives out full absolute URLs based on the URL in config.php.  There isn't really a way to do relative paths at the moment, but it's come up in the past and I should probably look into it...
It seems to be just the first view of the index that does not have the correct path ie. when you go to www.mysite.com, the stylesheet link is wrong, but if you click on a link that takes you to the same page, its right again. Weird

Any way to get around it?
I have changed config.php to have the internet domain name (www.mysite.com)


Thanks
JQ

Re: Hompage stylesheet linked to local server name

Post by JQ »

Is there some settings I should check on my webserver (apache) ?
JQ

Re: Hompage stylesheet linked to local server name

Post by JQ »

just cleared my cache.....it works now


Props to Ted!
Locked

Return to “CMSMS Core”