Re: interact with .htaccess

From: Date: Sun, 15 Jun 2003 10:57:00 +0000
Subject: Re: interact with .htaccess
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151553@lists.php.net to get a copy of this message
At 12:28 15.06.2003, Peter Berglund said: --------------------[snip]-------------------- >I want to send user and password from php to a protected directory. >For example: If I go directly to the directory I get a popup to enter user >and password, the normallt way. > >But if I go through a php-script that checks if I'm a valid user from a >database I will get access to the folder. > >So i need a way to send user/password from php to the .htaccess file. --------------------[snip]-------------------- I'm afraid this is not possible for the simple reason that the _client_ needs to transmit the auth credentials to the server. What you can do however is to somehow include the page contents in your PHP output. In case the .htaccess-protected content is a simple html page you could e.g. readfile() it, or process it in a similar way. HTH, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#151553) next »