Topic: Where has my www gone?

I am trying to fix the problem where my forums redirect to http://fantasticode.com/forums instead of http://www.fantasticode.com/forums despite the link being correct in the o_base_url settings under administration and in the cache_config.php file in the cache folder. I use .htaccess files on my main site, but they all include the www as well, so I am at a loss as to why punbb forces the dropping of the www.

Anyone got any ideas?

Thanks,
Charlie

Re: Where has my www gone?

PunBB doesn't do that. From the headers being sent, it looks like you put a .htaccess file in the forums directory that is doing this.

Re: Where has my www gone?

Hmmm... there's no htaccess file in my forums directory, I already checked.

Re: Where has my www gone?

Aha, I see
The issue is actually http://www.fantasticode.com/forums versus http://www.fantasticode.com/forums/
Without the trailing slash in the address, Apache uses the virtual server's name, which does not have the www in it. The trick is to redirect everything to the www address: that way, the two redirects cancel each other out. The alternative is to modify Apache's VirtualServer settings for that site.

Re: Where has my www gone?

Any more ideas anyone?

Re: Where has my www gone?

I just gave you the answer, the issue is Apache using the ServerName for the VirtualHost. You can either redirect to fix it or fix the VirtualHost settings. tongue

Re: Where has my www gone?

I have that issue in one of my forums and i haven't really care to fix it, though from time to time some users claim some links are broken...

does anybody has an example .htaccess that i can quicly copy to my server and forget this problem?

Re: Where has my www gone?

www is redundant anyway: forward all www.(*) request to $1 requests.

Re: Where has my www gone?

Thanks Smartys, sorry I didn't see your reply when I said do you have any ideas, as I hadn't refreshed the page. You're a saviour!

@pedrotuga - it is an issue for me as it affects my google links - if i search for:
link:www.fantasticode.com - I get 7 results
link:fantasticode.com - I get 90 results

Thanks everyone!