forward all ports via htaccess to new address
Posted
by
user875933
on Server Fault
See other posts from Server Fault
or by user875933
Published on 2012-11-02T20:56:36Z
Indexed on
2012/11/03
11:05 UTC
Read the original article
Hit count: 193
I have a chat server running on my local machine that listens to different ports. I want to use the sub-domain of one of my accounts to access it. I intend to manually change the redirect whenever my local machine gets a different ip address.
So:
chat.example.com:123
would redirect to dynamic.ip.address:123
I am trying to accomplish this with .htaccess and RewriteRule I have tried:
RewriteEngine on
RewriteRule ^(.*) http://dynamic.ip.address/ [L, R=302]
but this doesn't work. When I try chat.example.com:123
nothing happens. When I input chat.example.com
into the web browser, I get dynamic.ip.address
Is .htaccess the right tool for this?
I am using a simple web host that gives me ssh access, but not much more.
© Server Fault or respective owner