httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irmund Thum" <it...@it97.dyn.dhs.org>
Subject Re: port redirect question
Date Sat, 13 Apr 2002 14:09:11 GMT
Hans Juergen von Lengerke wrote:

> Depends what you mean with 'to be sent to'. In any case you will need
> mod_rewrite and two virtual hosts, one for foo.bar.com:80 and one for
> foo.bar.com:8888.  Assuming you don't want any other virtual hosts on
> the machine you could do:
> 
>   Listen 80
>   Listen 8888
> 
>   <VirtualHost _default_:80>
>     ServerName foo.bar.com
>     ____ here goes your rewrite rule ____
>   </VirtualHost>
> 
>   <VirtualHost _default_:8888>
>     ServerName foo.bar.com
>   </VirtualHost>
> 
> Now, if 'to be sent to' means the browser should be redirected to the
> 8888 server you'd put in your rewrite rule:
> 
>     RewriteRule ^(.*)$ http://foo.bar.com:8888$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 ^(.*)$ http://foo.bar.com:8888$1 [P]
>     ProxyPassReverse / http://foo.bar.com:8888
> 
> Check the documentation on Rewrite and VirtualHosts.
> 
> Good Luck, Hans
> 
> 
> Hugh Williams <hughw@soco.agilent.com> on Apr 10, 2002:
> 
> 
>>Hi;
>>
>>Well, I *thought* I knew what I was doing...
>>
>>I want to cause all visits to
>>
>>http://foo.bar.com/<stuff>
>>
>>to be sent to
>>
>>http://foo.bar.com:8888/<stuff>
>>
>>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

if you're still stuck with mod_rewrite and want immediate results,


simply use a meta redirect tag with 0 within the head of your main index.html



-- 
_ ___
|  |  Irmund    Thum
|  |


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message