.htaccess problem
-
Hello
We have a client running 100+ domains on their dedicated server under a single cpanel account
apache looks like this
Master domain /home/username/public_html/
addon domains: /home/username/public_html/addon-domain/we want to lock down wp-login.php and wp-admin to certain IPs
if we add to htaccess in each domains folder:
#allow wp-admin to selected IPs <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$ RewriteRule ^(.*)$ - [R=403,L] </IfModule>
then this fixes it, however their is over 100 installs and if an IP changes we want a quick way to update it.
I tried adding it to /home/username/.htacess however it doesn’t appear to work no doubt due to an error in the content.
can someone help me change the above to work on all domains/sub-files/folders that match wp-login/wp-admin so we have just a single .htaccess file to control this?
- The topic ‘.htaccess problem’ is closed to new replies.