Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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    

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



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

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


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.