?
Solved

A prompt for a password

Posted on 2003-03-10
6
Medium Priority
?
234 Views
Last Modified: 2010-04-09
I have an link to a page in a password protected area (.htpsword) on a UNIX server. Every time I go to this link there is a "username/password" windows appears. This is fine, but when I click "cancel" on this window, there is generic "Authorization required..." page displayed.

Question: how can I make is stay on my page (without displaying "Authorization required..." screen) if I hit "cancel"?
0
Comment
Question by:alex1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8106631
Post your code please.

Cd&
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8109180
What do you mean with "stay"?
Do you mean return to the page where the authorization requesting link was placed?

There is no way to return to this public page where you come from by clicking authorized link.
The control is totally on server and no scripting can jump you back at some authentication code condition.

0
 
LVL 1

Author Comment

by:alex1234
ID: 8110927
COBOLdinosaur, there is no code - it's just an HTML link.

Zvonko, "Do you mean return to the page where the authorization requesting link was placed?" - yes! I said "stay" because to the user it looks like he didn't leave the page - the password dialog appears on the top of it. This is just a generic username/password dialog that pops up when you protect a page with .htaccess/.htpasswd files on UNIX servers.

"The control is totally on server" - what should I change on the server? I seen this behavior on some WEB site - I clicked "cancel" and no error page was displayed, I "stayed" on the original page.


0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 63

Accepted Solution

by:
Zvonko earned 200 total points
ID: 8110998
Difficult to say without knowing what server you use.

Normally is there a way on every server to customize the output of error 401
For example you could have the option in httpd.conf to set some url for error page.
In the html of this error page you could place some line like:
<script>history.go(-1)</script>
 
Or
<script>window.location=window.referrer</script>

Or have a short message which redirects you after three seconds.

Good luck,
Zvonko

0
 
LVL 1

Author Comment

by:alex1234
ID: 8111128
I host my WEB site on a pay "virtual server" which means I'm not the only one who uses it. Can I create httpd.conf in my "virtual" space i.e. www.mysite.com/docs directory or httpd.conf is only one for entire physical server and changing it will affect other users?
 
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8117963
This again a point I can only guess.
You still do not state what product your web server is.

Nevertheless is the correct one answering this question your technical support offered by your web hosting provider.

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question