Safari ignores ErrorDocument 401 redirects
I have a website with a few directories, the contents of which are protected with .htaccess files. If an unauthorized user attempts to view the contents, they are redirected to an error page. The line in my htaccess file to do that looks like this:
ErrorDocument 401 /unauthorized.php
Every browser behaves as expected except Safari. Safari just stays on the original referring page and doesn't do anything. It completely ignores the directive in the htaccess file? I've googled this and found that this may be a issue with how Safari handles redirects to php pages but that was from 2004 and it seems like Apple hasn't fixed the problem.
It happens with every version of Safari for any Mac OS. I've never tried the Windows version
Unfortunately, I have to use a php page in order to get info about the user (IP address, what page they are trying to view, purchasing options)
Does anybody else have any idea how I can solve this?
