Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

..htaccess and change text "please type your username and password"

Posted on 2002-05-08
4
Medium Priority
?
246 Views
Last Modified: 2010-05-18
How to change the text "please type your username and password" in the .htaccess pop-up?

Jeffeny
0
Comment
Question by:harryv
[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
4 Comments
 
LVL 15

Expert Comment

by:samri
ID: 6996256
Harryv,

The keyword that you are looking for is "AuthName".

Please drop by Apache's website on more detailed discusion on Authentication, Authorization, and Access Conrol.

http://httpd.apache.org/docs/howto/auth.html

Following is and example (taken from that site too.)

AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /usr/local/apache/passwd/passwords
Require user rbowen sungo

This would cause the pop-up box to have "By Invitation Only" displayed, followed by Username, and Password input field.

I hope this helps.

cheers.
0
 

Author Comment

by:harryv
ID: 6996302
The AuthName "By Invitation Only" is shown by "realm"
What I mean is the words "please type your username and password".

Jeffeny
0
 
LVL 15

Accepted Solution

by:
samri earned 300 total points
ID: 6996457
I think I got what you really want,  Instead of a plaint "Enter username for <Realm> at <Servername:port>", you need to display something more informative.

According to Apache's documentation, it is browser-dependent, and nothing to do with server side:

I'm not sure whether it is possible with BasicAuthentication.  Unless you know JavaScript for example, you can develop your own Authentication pop-up box, which pretty much up to your preferences.


Take a look at this URL, and the section.
http://localhost:8000/manual/howto/auth.html
How can I change what the password box looks like?

The dialog that pops up for the user to enter their username and password is ugly. It contains text that you did not indicate that you wanted in there. It looks different in Internet Explorer
and Netscape, and contains different text. And it asks for fields that the user might not understand - for example, Netscape asks the user to type in their ``User ID'', and they might not
know what that means. Or, you might want to provide additional explanatory text so that the user has a better idea what is going on.

Unfortunately, these things are features of the browser, and cannot be controlled from the server side. If you want the login to look different, then you will need to implement your own
authentication scheme. There is no way to change what this login box looks like if you are using basic authentication.
0
 
LVL 15

Expert Comment

by:samri
ID: 6997948
Correction:  The URL should be;
http://httpd.apache.org/docs/howto/auth.html
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

604 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