Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

Apache RewriteCond multiple ip not working

$
0
0

I have a problem with my .htaccess file which looks like this :

<IfModule mod_rewrite.c>RewriteEngine OnRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.phpRewriteCond %{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

  1. 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.

  2. After redirect http to https request becauce when I type http://example.com, I get a 403 error.

Thanks in advance


Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>