Ökii
12-10-2002, 06:47 PM
if($HTTP_SERVER_VARS['http_host'] !== 'www.domain.com')
{
$with_www = 'http://www.domain.com/'.$REQUEST_URI;
header("location: $with_www");
exit;
}
doesn't appear to be working.
Problem: cookies set at www.domain.com are not viewable by just domain.com.
Solution: quick test and if the URL doesn't have www in it, redirect to the same just with a www in it. eg
http://domain.com/blat.php --> http://www.domain.com/blat.php
Would mod_rewrite be a better method of accomplishing that?
{
$with_www = 'http://www.domain.com/'.$REQUEST_URI;
header("location: $with_www");
exit;
}
doesn't appear to be working.
Problem: cookies set at www.domain.com are not viewable by just domain.com.
Solution: quick test and if the URL doesn't have www in it, redirect to the same just with a www in it. eg
http://domain.com/blat.php --> http://www.domain.com/blat.php
Would mod_rewrite be a better method of accomplishing that?