I'm trying to trap 401 errors by redirect users to a page which will log their IP address if they enter a wrong password or username.
I got the loggin bit right using a perl script with SSI in an shtml doc but I'm having problems with the redirect.
In the .htaccess in the public_html dir I have:
AuthType Basic
AuthName MySite
<Limit GET POST>
deny from xxxxx
</Limit>
ErrorDocument 404 /~acmedude/404.html
ErrorDocument 401 /~acmedude/401.shtml
The 404 redirect works fine but when I try to access a secure area on the site eg
and then put in a duff password I get the 401.shtml page but the images are not found - its like the page is in the wrong sub folder. Also the password box keeps popping up even though I cancel it.
What am I doing wrong?
I got the loggin bit right using a perl script with SSI in an shtml doc but I'm having problems with the redirect.
In the .htaccess in the public_html dir I have:
AuthType Basic
AuthName MySite
<Limit GET POST>
deny from xxxxx
</Limit>
ErrorDocument 404 /~acmedude/404.html
ErrorDocument 401 /~acmedude/401.shtml
The 404 redirect works fine but when I try to access a secure area on the site eg
and then put in a duff password I get the 401.shtml page but the images are not found - its like the page is in the wrong sub folder. Also the password box keeps popping up even though I cancel it.
What am I doing wrong?