I'm using
ErrorDocument 401 /error.php
In my htaccess file in a protected folder on my ftp,
error.php redirects to index.php/mode/error/
But if I upload that htaccess file it doesn't ask to login anymore,
it immediately redirects to the error page..
when I just put a normal html file
ErrorDocument 401 /error.html
it works again...
any input?
PHP + custom 401 redirect error.
Moderator: General Moderators
-
jabbaonthedais
- Forum Contributor
- Posts: 127
- Joined: Wed Aug 18, 2004 12:08 pm
nope, no error at all,
real strange.
Case:
ErrorDocument 401 /error.html
with error.html just a normal static html page
>> Works, asks to login, if fail redirect to error.html
Case
ErrorDocument 401 /error.php
with error.php a header redirect to index.php/mode/error/
>> Just redirects immediately to the error page instead asking to login.
Maybe it's because i'm redirecting twice? one time from 401 to error.php and a header redirect in error.php to index.php/mode/error/?
real strange.
Case:
ErrorDocument 401 /error.html
with error.html just a normal static html page
>> Works, asks to login, if fail redirect to error.html
Case
ErrorDocument 401 /error.php
with error.php a header redirect to index.php/mode/error/
>> Just redirects immediately to the error page instead asking to login.
Maybe it's because i'm redirecting twice? one time from 401 to error.php and a header redirect in error.php to index.php/mode/error/?
-
jabbaonthedais
- Forum Contributor
- Posts: 127
- Joined: Wed Aug 18, 2004 12:08 pm