Re: IIS PHP 301 Redirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jack Sen,

Order may matter (depending on PHP version) - try sending the Status after the Location.

Are you sure PHP is outputting the right headers? The easiest way to find out is to use the cgi version of PHP (php-cgi.exe or php.exe depending on your version of PHP) so you can see the outputted headers.

You may also try naming the file "nph-filename.php" and then accessing it as such. If you are using CGI, this tells IIS to leave the headers alone and send them as they should be.

If you are currently using CGI, you may also wish to look into switching to ISAPI if at all possible, as it is more efficient.

Regardless, it seems to work fine for me using PHP 5 and Apache.

-[Unknown]

-------- Original Message --------

Hi,
I am having problem with PHP header location with IIS 6.0. Even after i sent
the

header("HTTP/1.1 301 Moved Permanently");

the

header (Location: url);

always return 302 redirect.


any solution to this problem?

Thanks.

Jack Sen

-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux