Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using the following command inside home/ to block all access to wp_login.php

<Files wp-login.php>
order deny,allow
deny from all    
</Files>

How can I allow certain instances of wp_login.php for example, allow:

home/bob/public_html/wp_login.php

and

home/jim/public_html/wordpress/wp_login.php ?

share|improve this question
    
To all who are voting to migrate to webapps this isn't on-topic for them. It's a valid question for here. –  KronoS Apr 10 '13 at 18:26

1 Answer 1

You would need the appropriate .htaccess file in the new directories stating that the wp-login.php files in those are allowed access.

Apache will check the .htaccess file in the current directory, then "backtrack" until it hits the DocumentRoot. The most relevant directive will apply, therefore a deny in /home and an allow in /home/user/ will allow access to the instance in the user directory, while denying everywhere else under /home.

It does not seem possible to have all directives in the same .htaccess file; in that case, the deny rule seems to override the others (just tested on Apache 2.2.22).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.