Welcome to Geeklog, Anonymous Saturday, December 28 2024 @ 06:22 am EST
Geeklog Forums
Problem with URL
stormer
Anonymous
When I go to my site by typing in www.domain.com it (for a moment) swaps to domain.com (without www) and then (in the same second) back to www.domain.com? "Older stories" block also contains links to stories using urls without www, while "admins" block does it right as links in it are pointing to urls with www. Url that I have set for site in the config.php is www.domain.com so I dont understand why does it then have to switch between them..
7
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Geeklog tries to ensure that the site comes up with the URL you set in config.php, so that cookies and the login work properly. There's a piece of code at the beginning of index.php that does that by comparing the current URL with the server's host name and doing a redirect when they don't match.
When you do a phpinfo(), what's your server's host name (HTTP_HOST variable in the phpinfo() output)? www.domain.com or domain.com?
The content of the Older Stories block uses the $_CONF['site_url'] variable to create the URLs for the links in that block, the links from the Admin block use $_CONF['site_admin_url'].
Did you change one of those variables recently? While the Admin block is created "on the fly", the Older Stories block is not updated until you save a new story. So maybe you changed the site_url but didn't edit or create a story since then?
bye, Dirk
8
6
Quote
stormer
Anonymous
Hi Dirk,
Strange.. Ive just checked those links again and they are all pointing to www.domain.net now which is good. However, the swap I mentioned before is still going on while accesing site by typing in www. It goes www, 0, and back to www. Ive checked phpinfo and got HTTP_HOST www.eminem.net which is as you said it should be. Any idea what else could be wrong?
Thanks!
7
8
Quote
All times are EST. The time is now 06:22 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content