.htaccess password via URL?

Hi all!

Here’s my problem - I secured a directory of my website with a .htaccess/.htpasswd-pair, because it contains the content manager of that site.

Now the content manager is able to build .html-files from parts in the manager’s directory via a template system and writes them to directories outside the manager’s dir.

The problem is: To build the .html-files I have to call the template system via http (like “http://www.website.com/managersdir/templatesystem/template.php4?values&for&the&files&to&be&part&of&that&page”), to masquearde a server requesting the page so that php processes it the right way. But since the manager’s directory is secured with the .htaccess, the request fails.

So is there a way to include the login/password-pair into the url with whom the template system is called?


This should work - http://user:password@www.domain.com/blah/blahblah

  • Matt

Yes - it works!


I have the same problem. I have protected a directory on my website
mydir is password protected and i need to access a txt file in this dir through an URL
I tried doing http://user:password@www/mywebsite.com/mydir/textfile.txt
but it doesnt work. Any help ?? Please respond ASAP.