Error 402: Payment required

7:58pm, 13th November 2006

I just discovered how to generate arbitrary HTTP response codes using apache. You put a configuration line, for example

Redirect 410 /2003/recent

somewhere apache will see it. That could be in the main server config file, an .htaccess file in the web site’s root directory, or - my preferred solution - an .htaccess file in the directory which you are trying to mess with. This keeps the root .htaccess file (or the main server config file) from filling up with redirection cruft over time.

The syntax is explained in the apache docs.

You can also use ErrorDocument statements to make the pages a little more interesting. I thus present the web’s only genuine 402 error: premium subscription-only james.lab6.com content!.


Leave a comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Please enter the following words to prove your humanity: