.htacess password protection folder |
[eluser]searain[/eluser]
Code: RewriteEngine on This is my root .htaccess, so I tell that the folder php is not using the Rewrite for clean url, for files in the folder named as "php", it is just using regular url as it is. Such as http://www.mysite.com/php/test.php It is working fine. But then I also want to put the folder "php" under password protection So I added the following .htaccess in folder "php" Code: require valid-user Afer I did that, I didn't get password protection on the folder "php", insead, I got page not found error when I try to access http://www.mysite.com/php/test.php It seems the .htaccess in root and .htaccess in php get conflicts. Any advice to fix it? Thanks!
[eluser]searain[/eluser]
http://ellislab.com/forums/viewthread/142001/#698395 This gives the answer. All I need to do is add one more line in root .htaccess RewriteCond $1 !^(401.shtml) Code: RewriteEngine on Then I can put .php under .htaccess protection. |
Welcome Guest, Not a member yet? Register Sign In |