Link to home
Start Free TrialLog in
Avatar of Smoerble
SmoerbleFlag for Germany

asked on

How to redirect/remap subdomain to IP + port (not DNS!)

I have a subdomain and I want to point it to a Teamspeak server.
I don't want to do this with a DNS entry.

My possibilities (if any of them can do what I want):
- .htaccess
- PHP redirect
- HTML redirect
- Plesk admin panel

Issue:
The target is Teamspeak, a URL usually looks like this:
ts3server://1.2.3.4?port=123456
For this I use a TSDNS service from the Teamspaek service provider, I can access the server alternativley via
1234.some.domain.com


Questions:
- I want to use the domain ts.mydomain.com to connect to our teamspeak server
- How can I get this working please without changing a DNS entry?
- when using .htaccess, where do I have to places this file? (currently no -htaccess is used, the server runs with Plesk though)
Avatar of Robert Saylor
Robert Saylor
Flag of United States of America image

Simplest method create the index.php or index.html file for the sub domain and use a meta refresh tag.

However, a CNAME DNS entry would be the cleanest approach.
Avatar of Smoerble

ASKER

CNAME is not possbile for me (small hoster and he's not reachable the next days ;)).

I am looking for working HTML or PHP codes, because it seems to me, that the ones I am trying are somehow buggy.

Example HTML:
<META HTTP-EQUIV="refresh" CONTENT="0;URL=1234.some.domain.com">

Open in new window

I assume, this doesn't work, as the TS client (software) is not redirected when accessing HTML code. Not sure about this though.

Example: PHP:
<?php
header('Location: 1234.some.domain.com');
?>

Open in new window

Gives error 500 in a browser (works as designed I think) but not working with TS client software.
ASKER CERTIFIED SOLUTION
Avatar of Robert Saylor
Robert Saylor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial