i mean the HTTP/1.1 xxx yyyyyyy

header i can modify all others with mod_headers but want to be able to return a status 200 for 403 error pages to a particular user-agent that dosn't display the text of my 403 pages {it displays an alternate page}

just asking if anyone knows an env-var or header name i can alter in apache.conf to alter this header in any way {once i have that i can work out the making it user-agent specific bits


this is specifically to deal with one user-agent {not IE} {a moblie transcoder} that doesn't pass the 403 text to the human user {and the 403 page gives details on how to un-ban themselves}

Written by Alan Doherty

Accepted Answer

You could set up a php script for your 403 error page and modify the header with that script:

Put a line like this in your .htaccess or Apache configuration file:

ErrorDocument 403 /path/to/your/error/script.php

And the following in said php file:

if($_SERVER['HTTP_USER_AGENT'] == 'FooBot 1.2') {
  header("HTTP/1.0 200 OK");

Or do the same thing in your preferred language.

Written by Erik Bakker
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki