httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <>
Subject Re: [users@httpd] Rewrite Rule Help (again)
Date Wed, 11 Jul 2012 02:19:39 GMT
In the event anyone comes across this, i got this to work using the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^/$ http://private.ip.address [R,L]

----- Original Message -----
From: "Chris Arnold" <>
Sent: Tuesday, July 10, 2012 9:37:30 PM
Subject: Re: [users@httpd] Rewrite Rule Help (again)

>You've been already given the answer by Eric what else do you need? Read mod_rewrite manual
and combine RewriteCond and RewriteRule >commands thats all you need to do. 

Igor,i have read the rewrite guide and tried what i thought was needed. Which i have repeated
here more than 1 time but this time i will show what i tried from the guide:
Move Homedirs to Different Webserver
Many webmasters have asked for a solution to the following situation: They wanted to redirect
just all homedirs on a webserver to another webserver. They usually need such things when
establishing a newer webserver which will replace the old one over time.

The solution is trivial with mod_rewrite. On the old webserver we just redirect all /~user/anypath
URLs to http://newserver/~user/anypath.

RewriteEngine on
RewriteRule   ^/~(.+)  http://newserver/~$1  [R,L]

And here is how i have altered it to fit what i need:
RewriteRule ^/$ [L]
This just leaves me at the webserver. I have also tried what others have suggested here and
replied with the results.

BTW, the solution Igor is referring to, does anyone have that email and can post it (send
it to me) as i seem to have lost that email.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message