A
A
Alexander2014-04-14 11:31:42
htaccess
Alexander, 2014-04-14 11:31:42

Tricky .htaccess setup

Hello,
Can you tell me if it is possible to configure .htaccess in such a way that when you enter the page for example test.com/info from the ip address 192.168.0.1 there is a redirect to the test.com/1 page, and if the ip address is 192.168.0.2 then the redirect to the page test.com/2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sgrogov, 2014-07-09
@sgrogov

RewriteCond %{REMOTE_ADDR} 192.168.0.1
RewriteRule ^.*$ /1 [R]
RewriteCond %{REMOTE_ADDR} 192.168.0.2
RewriteRule ^.*$ /2 [R]
something like this, didn't test for functionality.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question