<FilesMatch> directive ignored in Apache httpd.conf

admin

Administrator
Staff member
So I tried using this in the httpd conf at the bottom of the config file. My goal is to have this rule whitelist the wordpress admin to certain ip addresses. We have a quite a few installs on the server and want to protect this. However when placed, it doesn't recognize the rule and over looks it completely. I've tested it in a virtual hosts .htaccess file to verify the code is working

Code:
&lt;FilesMatch "^wp\-login"&gt;
order deny,allow
deny from all
allow from 1.2.3.4
&lt;/FilesMatch&gt;

Any help is appriciated. Bonus point if someone can get it to redirect the user else where as well. Thanks