: How to redirect a subdomain to the main domain at a different port with IIS I am trying to set up as following control.domain.com to http://domain.com:8880/ Plesk is running on that port. Infact
I am trying to set up as following
control.domain.com to domain.com:8880/
Plesk is running on that port.
Infact if I would like any website hosted on the server if accessed with "control.*" should go to mywebsite.com:8880/?. Is that possible?. Or we have to write rules for each websites?.
I do not know to enter rule here, so added as a image
More posts by @Gonzalez347
1 Comments
Sorted by latest first Latest Oldest Best
Create a subdomain.
for example: redirect.mydomain.com
and add code to index.php (i will use php for redirect):
<?php
$header = $_SERVER['SERVER_NAME'];
$end_p=strlen($header);
$header=substr($header,5,$end_p);
header("Location: $header:8080 );
?>
save and close.
Create default dns for control:
conrtol.domain.com and assign to redirect.mydomain.com
Thats all.
When you create a new site. Default dns control.domain.com will assign to new domain.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.