I have a problem with my .htaccess file which looks like this :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
RewriteCond %{REMOTE_ADDR} !^10x.x.x.[0-255]
RewriteCond %{REMOTE_ADDR} !^x.x.xx.[0-255]
#[OR]
###RewriteCond %{REMOTE_ADDR} !^15.x.xxx.[0-255]
#[OR]
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.[0-255] [OR]
#[OR]
###RewriteCond expr "-R '1x.x.x.x'"
###RewriteCond expr "-R '8.x.x.x'" [OR]
###RewriteCond expr "-R '9x.x.x.x/25'" [OR]
###RewriteCond expr "-R 'x.1x.x.x'"
RewriteRule ^.*$ error.html [L]
</IfModule>
# END WordPress
And what I’d like to do is that
-
if people try to access my site outside the ip addresses (ip1, ip2, ip3, ip4), they’ll be redirected to the error.html page and, if not, to the correct index.php page, but I can’t manage it in my combinations.
-
After redirect http to https request becauce when I type http://example.com, I get a 403 error.
Thanks in advance