Redirect on bases of ip address

Redirect on bases of ip address

am 14.02.2010 16:23:26 von Jos Chrispijn

Can someone tell me how I can redirect visitors to either index.php or
index.html on basis of their ip address?
I am in the process of building a new website and only for my own ip
address I want to get access to the new site (index.php) and have all
other visitors been redirected to the old website (index.html +
redirection).

thanks in advance
Jos Chrispijn



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Redirect on bases of ip address

am 14.02.2010 17:54:02 von Nilesh Govindrajan

On 02/14/2010 08:53 PM, Jos Chrispijn wrote:
> Can someone tell me how I can redirect visitors to either index.php or
> index.html on basis of their ip address?
> I am in the process of building a new website and only for my own ip
> address I want to get access to the new site (index.php) and have all
> other visitors been redirected to the old website (index.html +
> redirection).
>
> thanks in advance
> Jos Chrispijn
>
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

RewriteEngine On
RewriteCond %{REMOTE_ADDR} abc\.def\.ghi\.jkl
RewriteRule ^(.*)$ /index.html [L,R=302]

--
Nilesh Govindarajan
Site & Server Adminstrator
www.itech7.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org