Page 1 of 1

.htaccess & Removing password prompt from new windows

Posted: Thu Dec 07, 2006 9:49 am
by JustinK322
I have a directory that is protected with this .htaccess file:

Code: Select all

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile "/path/to/.htpasswd"
require valid-user

<Files ~ "\changecoverart.php$">
Order Allow,Deny
Allow from all
</Files>
For the files in the directory, I get the password prompt like I should be. My problem is with the changecoverart.php page and opening it in a new window. To access the changecoverart.php page, another page opens it in a new window and posts a form to it. When this happens, I am reprompted for a password. This is the password prompt that I am trying to remove. If I navigate directly to the changecoverart.php page, there is no password prompt.

Can anyone help me to get rid of the password prompt when opening this page in a new window?

Posted: Thu Dec 07, 2006 12:38 pm
by feyd
You could have PHP perform the authentication and do away the .htaccess altogether for the most part.

Posted: Thu Dec 07, 2006 1:01 pm
by JustinK322
The powers above tell me that I must use .htaccess.

Posted: Thu Dec 07, 2006 3:56 pm
by feyd
Did they give you a reason, or is it more of a "we don't know this mysterious thing called 'PHP powered'"?

Posted: Tue Dec 12, 2006 2:16 pm
by JustinK322
No, they didn't give a reason; they never do and they don't like to hear mine.

Posted: Tue Dec 12, 2006 5:31 pm
by feyd
Is it a problem to ask for one? "We don't like change" isn't satisfactory. :)