Following some guide on the web, I have created the following .htaccess for my WordPress installation:

# protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>

# protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>

plus chmod wp-config.php 600 and .htaccess 644.

Which is the simplest way I can test if it is working properly? In case, I can create some other files to verify the work. I only want to be sure.

link|improve this question
Programming questions should be asked on Stackoverflow. Server questions should be asked on Serverfault. I'm not sure which this is, but it's not a Superuser question. – Josh K Mar 8 '10 at 15:50
Actually @Josh, home server administration is typically accepted on SU. SF is geared towards IT pros who manage servers in a professional capacity. – heavyd Mar 8 '10 at 16:28
I thought that any file starting with ".ht" (like .htaccess or .htpasswd) was hidden by default with Apache (but I could be wrong). – squircle Mar 8 '10 at 16:37
Still think that you might get better results on SF. – Kevin M Mar 8 '10 at 16:39
feedback

migrated from superuser.com Mar 8 '10 at 16:49

This question came from our site for computer enthusiasts and power users.

2 Answers

If you want to test this from outside your network - as if you are a normal person across the internet, you can try using a proxy server such as Hidemyass or Proxify.

link|improve this answer
feedback

To test if the directives are working, just try browsing to the files:

http://yoursite.com/wp-site/.htaccess
http://yoursite.com/wp-site/wp-config.php

When accessing the files you should get an error page. Try removing the directives and test again, see that a valid page will load.-

link|improve this answer
feedback

Your Answer

 
or
required, but never shown