Mobile app version of vmapp.org
Login or Join
Gonzalez347

: 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

@Gonzalez347

Posted in: #Iis #Plesk #Redirects #UrlRewriting #Windows

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

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gonzalez347

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cody1181609

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme