Hello all,
Been playing around with capturing the entire URL. I dont have any problems
if it a file,
i.e. http://www.mydomain.com/somefile.php, I am running into problems with
this,
http://www.mydomain.com/test
This is what I use for "redirection" now (btw, it is IIS (Win2k) and PHP
4.3.2)
The test.mydomain.com is setup as a host header under IIS
$redirect = getenv("HTTP_HOST");
if ($redirect=="test.mydomain.com"){
header("Location:http://www.mydomain.com/modules.php?name=test");
}
The above code works fine. Redirects no problem.
However, I am trying to get this to do the same thing:
www.mydomain.com/test or www.mydomain.com/test/
and both would take you here:
http://www.mydomain.com/modules.php?name=test
I have tried every combination of the SERVER vars, but no luck.
I either generate a 404 or the test isn't part of the URL.
Any ideas ?