Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts

    401 error runs in protected directory

    I have a sub-directory that is protected with Basic Authentication. I have created a custom 401 error page in the root directory called 401.html and have inserted the following in .htaccess:

    ErrorDocument 401 /401.html

    The problem is when the 401 error page comes up, it is clearly running in the context of the "current directory" being the protected sub-directory, not the root directory.

    For example my 401.html references a menus.css file that lives in the root directory. It cannot find it. If I change the 401.html to say the css file is ../menus.css then it finds it. That proves that the 401 is running in the context of the lower directory.

    All other links on the 401 page act also as though they are relative to the lower directory not the root directory.

  • #2
    New Coder
    Join Date
    Aug 2012
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts
    bump bump


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •