Welcome Guest, Not a member yet? Register   Sign In
.htacess password protection folder
#1

[eluser]searain[/eluser]
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|php|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

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
Authname "Administration"
Authtype Basic
AuthUserFile /public_html/php/.htpasswd

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!


Messages In This Thread
.htacess password protection folder - by El Forum - 01-18-2010, 12:09 PM
.htacess password protection folder - by El Forum - 01-18-2010, 11:15 PM
.htacess password protection folder - by El Forum - 01-19-2010, 12:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB