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
I need something like "ErrorDocument 200" in .htac
Moderator: General Moderators
-
tomfra
- Forum Contributor
- Posts: 126
- Joined: Wed Jun 23, 2004 12:56 pm
- Location: Prague, Czech Republic
[quote="timvw"]We'" not a hotline/immediate response community :p[quote]
Actually, most of the time this community finds the answers much faster than just about any hotline
I'll probably use the "php_value auto_prepend_file" I mentioned, despite it will somewhat limit what I would like to achieve. I'll play with the "proxy idea" too.
Thanks!
Tomas
Actually, most of the time this community finds the answers much faster than just about any hotline
I'll probably use the "php_value auto_prepend_file" I mentioned, despite it will somewhat limit what I would like to achieve. I'll play with the "proxy idea" too.
Thanks!
Tomas