httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Martens <>
Subject Re: [users@httpd] redirect
Date Wed, 07 Dec 2005 21:36:13 GMT
On Wed, 2005-12-07 at 12:37 -0500, mwlist wrote:
> I'm setting up a system and need some advice the situation is described below.
> Currently
> Machine 1 is a linux box with apache 2 serving our main site
> Machine 2 has our users personal web site data which users upload with
> shell access.
> Machine 1 nfs mounts machine 2 and serves the user pages at
> I would like to get rid of the NFS mount.
> So can I have apache 2 forward requests for to
> machine 2 and still retain the same url? I was thinking of using
> mod_alias to do this.
> Redirect /~**
> Any ideas?

Mod_alias only uses paths on the local server, so that's not what you
are looking for. You probably want to use mod_proxy or mod_rewrite with
the [P] option for proxying.  ModRewrite would probably require the
least amount of apache configuration, once you get the right regular
expression that is.  

Something like "ProxyPass /~user" might work,
but to avoid putting a line like that in your apache config for each
user, you probably want to use a RewriteRule something like this:

RewriteRule   /~(.*)$1		[P]
Note, I'm not terribly good with mod_rewrite, but this should get you

You could also use the Redirect directive, but that would point your
clients to the other server so would become in your client's url, and I don't think that's
what you want.

Jason Martens

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message