folders and guest ip

Using a single web hosting account to host multiple sites

folders and guest ip

Postby overflow » Fri May 16, 2008 12:55 am

developer ip = 2.2.2.2
public project folder = "/webhost/public"
beta project folder = "/webhost/beta"

if guest ip 2.2.2.2 true www.adres.com -> beta project folder
else www.adres.com -> public project folder

RewriteCond %{REMOTE_ADDR} ^2\.2\.2\.2\..+$
RewriteRule
...

How I have mod_rewrite?
overflow
 
Posts: 19
Joined: Thu Oct 12, 2006 2:02 am
Location: Turkey

Postby richardk » Fri May 16, 2008 4:35 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{REMOTE_ADDR} ^2\.2\.2\.2$
RewriteRule ^(.*)$ /beta/$1 [QSA,L]

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.*)$ /public/$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby overflow » Tue May 20, 2008 12:50 am

Thanks richardk
overflow
 
Posts: 19
Joined: Thu Oct 12, 2006 2:02 am
Location: Turkey


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 1 guest

cron