By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,347 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,347 IT Pros & Developers. It's quick & easy.

Question about redirection using PHP on IIS

P: n/a
Hello all.
Win2k server, PHP 4.2.3, PHPNuke 6.0, IIS.

This code works great for redirecting the user:
$redirect = getenv("HTTP_HOST");

if ($redirect=="something.mydomain.com"){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

However, if I try this:
if ($redirect==www.mydomain.com/something){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

it generates 1) a 404 error, and 2) something about a TRANSLATE verb in my
URLScan log.
Does anyone know which IIS "verb" handles this ? I cannot find anything on
TRANSLATE,
and PHP is configured in IIS to accept/handle ALL verbs.

Many thanks.
Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

On 30-Jul-2003, "fartsniff" <fa**@sniff.com> wrote:
Win2k server, PHP 4.2.3, PHPNuke 6.0, IIS.

This code works great for redirecting the user:
$redirect = getenv("HTTP_HOST");

if ($redirect=="something.mydomain.com"){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

However, if I try this:
if ($redirect==www.mydomain.com/something){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

it generates 1) a 404 error, and 2) something about a TRANSLATE verb in my
URLScan log.
Does anyone know which IIS "verb" handles this ? I cannot find anything on
TRANSLATE,
and PHP is configured in IIS to accept/handle ALL verbs.


In the second example you forgot the quotes around
www.mydomain.com/something, so you got a php syntax error which probably
resulted in no output hence the 404 error.

--
Tom Thackrey
www.creative-light.com
Jul 16 '05 #2

P: n/a
thanks - that was my fault in a hasty copy/paste.
in there "real" code they quotes are there, and i still
get the error.

i am still looking thru my logs for the exact error.

"Tom Thackrey" <to***@creative-light.com> wrote in message
news:s0*******************@newssvr21.news.prodigy. com...

On 30-Jul-2003, "fartsniff" <fa**@sniff.com> wrote:
Win2k server, PHP 4.2.3, PHPNuke 6.0, IIS.

This code works great for redirecting the user:
$redirect = getenv("HTTP_HOST");

if ($redirect=="something.mydomain.com"){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

However, if I try this:
if ($redirect==www.mydomain.com/something){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

it generates 1) a 404 error, and 2) something about a TRANSLATE verb in my URLScan log.
Does anyone know which IIS "verb" handles this ? I cannot find anything on TRANSLATE,
and PHP is configured in IIS to accept/handle ALL verbs.


In the second example you forgot the quotes around
www.mydomain.com/something, so you got a php syntax error which probably
resulted in no output hence the 404 error.

--
Tom Thackrey
www.creative-light.com

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.