Forum Moderators: open

Message Too Old, No Replies

Why is different in browser if I use www or without?

         

toplisek

2:52 pm on Jan 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why is different in browser my website content if I use www or without?

If I use without it will work without problem my design but www will not be correct. I heard that www is treated on server like subdomain.

I have all the time path www.

Need help.

phranque

3:14 pm on Jan 20, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



some browsers will automatically try the www. subdomain if the base domain doesn't return a good response.
the correct practice is typically to direct both domains to the same server and the server should respond to example.com with a 301 redirect to www.example.com although in some cases the base domain actually has a specific purpose separate from the www. subdomain.

toplisek

3:27 pm on Jan 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have echo path like.
<?PHP echo $_PATHHOME ?>

and path si determined with complete domain name with www and also / like:
$_PATHHOME = "http://www.mydomain.com/";

Strange that when I put link with this path into logo link it
1. will be redirected to [mydomain.com...]
2. the same in IE but in IE is perfect design. Mozilla has corrupted font sizes, borders..
3. Is it better to have $_PATH1 ="http://" . $_SERVER['HTTP_HOST']."/"; or
$_PATH6 =$_SERVER['DOCUMENT_ROOT']."/";
4. I have heard that PATH like $_SERVER['HTTP_HOST'] is not good to be used for included files.