Forum Moderators: phranque

Message Too Old, No Replies

How to serve a different site to an ip address block?

Want to release a redesign on a small scale first.

         

tolachi

2:56 am on Mar 10, 2005 (gmt 0)

10+ Year Member



Basically I have /var/www/new-site and /var/www/old-site. I would like for everyobdy in an ip range to see new-site and everybody else to see old-site. It seems like this is something that I should be able to do with apache, is it? I have full access to everything on the server, which is a pretty standard LAMP setup. Any advice appreciated.

TIA

tolachi

6:19 pm on Mar 10, 2005 (gmt 0)

10+ Year Member



So the answer is something like this:

Alias /old-site/ "/var/www/old-fcl/"
Alias /old-site "/var/www/old-fcl"

#redirect me to the the old site
RewriteCond %{REMOTE_ADDR} ^ip.address.regex.here$
RewriteRule ^(.*)$ /old-site%{REQUEST_URI} [PT]

Hope somebody else finds that useful.