Wordpress: Difference between revisions

From Psygen Wiki
Jump to navigation Jump to search
Created page with "== Default Wordpress .htaccess == <pre> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FI..."
 
Line 15: Line 15:


== Deny Access to WP login except for certain IP's ==
== Deny Access to WP login except for certain IP's ==
(add to the .htaccess for the site)


<pre>
<pre>

Revision as of 20:42, 1 April 2017

Default Wordpress .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


Deny Access to WP login except for certain IP's

(add to the .htaccess for the site)

<Files "wp-login.php">
# set up rule order
order deny,allow
# default deny
deny from all
# Add IPs for access below:
allow from 10.20.4.0/22
allow from 192.168.5.20
# End of additional IPs
errordocument 401 default
errordocument 403 default
errordocument 404 default
</Files>