0

Possible Duplicate:
Apache virtual host based on source IP

For a certain visitor, identified by an IP, how to server contents from different DocumentRoot?

Pentium10
  • 444
  • 1
  • 9
  • 23

1 Answers1

1

Changing the document root according to IP is not very efficient, and to my knowledge, not possible.

But you can include your various versions of the web site in the document root, and use mod_rewrite rules to serve the proper version according to client IP.

RewriteCond %{REMOTE_ADDR} IP
RewriteRule ^/(.*) /properroot$1
hayalci
  • 3,631
  • 3
  • 27
  • 37