Redirect on bases of ip address

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 <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Jos Chrispijn [ So, 14 Februar 2010 16:23 ] [ ID #2032278 ]

Re: Redirect on bases of ip address

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 <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] 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 <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Nilesh Govindrajan [ So, 14 Februar 2010 17:54 ] [ ID #2032281 ]
Webserver » gmane.comp.apache.user » Redirect on bases of ip address

Vorheriges Thema: Apache server getting lot of Closing connection
Nächstes Thema: Re: Apache Tomcat/httpd websites problem ?