I need something like "ErrorDocument 200" in .htac
Posted: Wed Apr 19, 2006 3:59 pm
I know I can use ErrorDocument 403, ErrorDocument 404 etc to redirect all requests with the given status / error code to a page (or PHP script) I want such as:
ErrorDocument 403 /error.php
But I need a solution that will execute a PHP script for all "200 OK" requests. I know about "php_value auto_prepend_file" but that works for PHP files only.
What I want to accomplish is to check whether the user is allowed access to my website based on criteria such as their IP address. The check itself needs to be handled by a PHP script. It will be up to the PHP script to decide whether the user is allowed access or not so Apache should send all requests (including the "200 OK" ones) to it.
Any ideas?
Tomas
ErrorDocument 403 /error.php
But I need a solution that will execute a PHP script for all "200 OK" requests. I know about "php_value auto_prepend_file" but that works for PHP files only.
What I want to accomplish is to check whether the user is allowed access to my website based on criteria such as their IP address. The check itself needs to be handled by a PHP script. It will be up to the PHP script to decide whether the user is allowed access or not so Apache should send all requests (including the "200 OK" ones) to it.
Any ideas?
Tomas