Date: 20 Jan 2002 11:58:55 +0000 From: Wayne Pascoe <freebsd@molemanarmy.com> To: Trevin Chow <trevinchow@yahoo.com> Cc: questions@freebsd.org Subject: Re: using mod_rewrite to redirect ports? Message-ID: <m2it9xw7wg.fsf@set.home.penguinpowered.org.uk> In-Reply-To: <20020119234506.K50936-100000@benny.geektank.org> References: <20020119234506.K50936-100000@benny.geektank.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Trevin Chow <trevinchow@yahoo.com> writes: > I'm trying to figure out how to properly setup mod_rewrite on Apache > 1.3.22 to redirect > requests for any sub-domain requests to the same subdomain but on a > different port. > > In other words: > > http://<some_sub_domain>.foo.com ---> > http://<same_sub_domain>.foo.com:8080/ I would guess something like RewriteRule /(.*).foo.com http://$1.foo.com:8080/ \ [redirect=temporary,last] Try that as a start. Also, set RewriteLogLevel to something like 3 and watch what happens at the request stage. TURN THIS OFF BEFORE GOING PRODUCTION! THE LOGS WILL EAT DISK SPACE _FAST_. Sorry, just had to lob that in there :) Lastly, be careful with directing web requests to ports other than 80 or 8080 if you want the world to be able to reach the site. A lot of corporate firewalls these days only allow outgoing requests to certain known ports. HTH -- - Wayne Pascoe | Things fall apart; the centre cannot hold; freebsd@molemanarmy.com | Mere anarchy is loosed upon the world. http://www.molemanarmy.com | - Yeats | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2it9xw7wg.fsf>