Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Trying to figure out how to give access to a certain page, lets say and not letting people access the main index via Or just simply disallow access to and let people be able to input whatever subdirectory they want and let through if the page do exist. Is this possible to achieve with Wordpress?

/page is created by Wordpress and not some HTML page I want to give access to.

Tried this but with no luck

AuthUserFile path/to/.htpasswd
AuthName "Gone fishin', come back soon"
AuthType Basic
<Files "index.php">
  require valid-user
share|improve this question
If you want to implement this on .htaccess level that is not really specific to WordPress and would be better asked at Stack Overflow. – Rarst Sep 16 '13 at 12:47
@Rarst You might be right. The reason I posted here was because there's already some .htaccess interaction happening within Wordpress, how posts and pages are assigned. Thus I figured it's somehow Wordpress specific how htaccess handles these rewrites. – INT Sep 16 '13 at 16:29
While WP does use .htaccess rules (which is essential for pretty permalinks) what you are trying to do is unlikely to intersect with that. – Rarst Sep 16 '13 at 16:58

Your Answer


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

Browse other questions tagged or ask your own question.