httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Juergen von Lengerke <>
Subject Re: port redirect question
Date Thu, 11 Apr 2002 07:52:16 GMT
Depends what you mean with 'to be sent to'. In any case you will need
mod_rewrite and two virtual hosts, one for and one for  Assuming you don't want any other virtual hosts on
the machine you could do:

  Listen 80
  Listen 8888

  <VirtualHost _default_:80>
    ____ here goes your rewrite rule ____

  <VirtualHost _default_:8888>

Now, if 'to be sent to' means the browser should be redirected to the
8888 server you'd put in your rewrite rule:

    RewriteRule ^(.*)$$1 [R]

If you want the request to be proxied internally (ie. the browser
shouldn't be aware of the 8888 server) you'd do:

    RewriteRule ^(.*)$$1 [P]
    ProxyPassReverse /

Check the documentation on Rewrite and VirtualHosts.

Good Luck, Hans

Hugh Williams <> on Apr 10, 2002:

> Hi;
> Well, I *thought* I knew what I was doing...
> I want to cause all visits to
> to be sent to
> I've tried various combinations of virtual hosts and/or rewrite
> directives, but the results have been less than perfect.  Does someone
> have a simple recipe t oaccomplish this transformation consistently?
> Thanks,
> hugh

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

View raw message