forward all ports via htaccess to new address
- by user875933
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.