Here's the case: I'm working on a new version of my website, this time with a php/mysql-login-system. On my old site i use .htaccess to password protect certain directories. In the new site i would like a similar sort of protection but i don't want two login systems side by side. When thats the case, a user first needs to logon to the site and then when he/she reaches a protected part also needs to http_auth. This causes confusion, and since i have this nice php login system now i would like to use that site-wide. for most parts of the site i'm able to stop navigation to the protected parts, but somewone can still enter the url manually and thus get to the files. So can someone help me with this? ether a way to control .htaccess through php. or another way to protect files and directorys in a way that logged in users can still reach them. I don't realy know what information or code i should supply for better understanding, so i start by this: - The server is on my own machine(@home) running: - OS: gentoo - Server version: Apache/2.0.58 Server built: Jul 31 2006 17:14:51 - PHP 5.1.4-pl6-gentoo (cli) (built: Sep 6 2006 13:36:40) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies - mysql Ver 14.7 Distrib 4.1.21, for pc-linux-gnu (i686) using readline 5.1