Re: [PHP] $_SERVER['HTTP_HOST'] without the 'www.'

2004-08-31 Thread Greg Donald
On Tue, 2004-08-31 at 09:38, Shaun wrote: > Hi, > > How can I get the URL of the page I am on without the 'www.' i.e. just > mydomain.com? I need to enurse this is correct in case the user types in the > domain without using the 'www.'. > > I have looked at using substr but if the user leaves out

Re: [PHP] $_SERVER['HTTP_HOST'] without the 'www.'

2004-08-31 Thread Nick Wilson
* and then Shaun declared > Hi, > > How can I get the URL of the page I am on without the 'www.' i.e. just > mydomain.com? I need to enurse this is correct in case the user types in the > domain without using the 'www.'. parse_url() ;-) -- Nick W -- PHP General Mailing List (http://www.p

Re: [PHP] $_SERVER['HTTP_HOST'] without the 'www.'

2004-08-31 Thread Michal Migurski
> How can I get the URL of the page I am on without the 'www.' i.e. just > mydomain.com? I need to enurse this is correct in case the user types in > the domain without using the 'www.'. This should be Apache's job - you can configure the webserver to redirect requests from example.com to www.exam