F
F
firemark_s2016-02-16 16:05:58
htaccess
firemark_s, 2016-02-16 16:05:58

IP separation via .htaccess?

The bottom line is that certain IP addresses should see the index.php file
All other IPs should see the index.html file
How to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-02-16
@mytmid

for example like this:

RewriteCond %{REMOTE_ADDR} !^(192\.168\.100\.1|192\.168\.100\.2)$ [NC]
RewriteRule ^.*$ index.html [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ index.php [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question