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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Intercepting called prompt request (.htacess/.htpassword)

    Hi:

    I'm using .htaccess/.htpassword to protect files and directories on my site. So, if you click on a link to a protected directory, you will get a password prompt. However, if someone who is not a client is just being curious, a common occurence, and clicks on the link then cancels the password prompt, they end up looking at an ugly "Authorization Required" page that does not match the design of my site.

    So, I'd like to customize this page. However, my host's tech support told me that they do not offer this ability. However, they suggested, without telling me how, that I could intercept the cancelled prompt with Javascript, and supply my own custom page, I suppose.

    Anyway, does anyone know how to do this: Intercept a cancelled .htacess/.htpassword prompt???


    Thanks,


    James
    He is risen!!!
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    to the best of my knowledge ( admittedly limited in certain areas ), that's more than impossible, thats superbly impossible.

    moreover, even if it were possible, you'd still have to customize the 403 page, in order to put the javascript on it.

    the moral: don't trust tech support.



    i'd ask if you're allowed to implement the custom error pages yourself. it's not that hard, especially if you've read Feyd's tutorial:
    http://www.javascriptkit.com/howto/htaccess.shtml
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Joh6nn:

    Thanks for the handing reference link. Unfortunately, I don't have permission to change the .htaccess file, or to change the permissions, so I guess I'm stuck with the default page.

    I appreciate your help though.


    James
    He is risen!!!
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "


  •  

    Posting Permissions

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