Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-31-2002, 04:18 AM   PM User | #1
jamescover
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
jamescover is an unknown quantity at this point
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. "
jamescover is offline   Reply With Quote
Old 08-31-2002, 04:44 AM   PM User | #2
joh6nn
wei wu wei


 
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
joh6nn is an unknown quantity at this point
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.
joh6nn is offline   Reply With Quote
Old 08-31-2002, 06:04 AM   PM User | #3
jamescover
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
jamescover is an unknown quantity at this point
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. "
jamescover is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:40 AM.


Advertisement
Log in to turn off these ads.