View previous topic :: View next topic |
Author |
Message |
Vahn -
Joined: 10 Aug 2005 Posts: 51 Location: At my computer
|
Posted: Thu Sep 14, 2006 3:52 am Post subject: Server Status? |
|
|
Back again with more Mind Boggling questions:
i was wondering if the server sent what status code it got to php in any shape or form ( such as when it was a fine deal it would send to say $_SERVER['Status_code'] = 200 and a 404 would be 404 insted of 200, ya follow...
if this is done it would be greately appreciated, if not any ideas how to get that code Via php? _________________ A ship in the harbor is safe, But thats not what Ships were Built for. ~ John Shedd
Success Comes before Work only in the Dictionary ~ Harvey Mackay
 |
|
Back to top |
 |
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Sep 14, 2006 7:04 am Post subject: |
|
|
Run this PHP script as your 404 error page and check for the Error code under
the "REDIRECT_" variables. Hope this information helps you.
Code: | <?php
phpinfo();
?>
|
Sincerely, TRUSTAbyss |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Sep 14, 2006 11:38 am Post subject: Re: Server Status? |
|
|
Vahn,
REDIRECT_STATUS_CODE is the CGI var you're looking for.
http://www.aprelium.com/data/doc/2/abyssws-win-doc-html/cgivars.html reads:
Quote: | If the request results from an internal redirection (from an SSI document or if it is used as a custom error page for example), the environment variables of the parent request are also added and each variable name is prefixed by REDIRECT_. The parent request's status code is stored in the special variables REDIRECT_STATUS and REDIRECT_STATUS_CODE. The cookies of the parent request are also passed to the redirected request in the COOKIES environment variable. REDIRECT_STATUS_CODE may seem redundant but it is actually useful when with PHP scripts as some PHP configurations require setting REDIRECT_STATUS to a fixed value. |
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|