1

I am trying to set up as following

control.domain.com to http://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 http://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

enter image description here

  • so when anyone open your site like mysite.com , you want to redirect them to mysite.com :8880? – Helping Hands Dec 19 '14 at 5:11
  • No,when someone visits control.mysite.com, he should go to mysite.com:8880. – user2544596 Dec 19 '14 at 5:21
  • you site built with asp.net? – Helping Hands Dec 19 '14 at 5:23
  • Not all of them. Some of them are php based. – user2544596 Dec 19 '14 at 5:41
1

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: http://$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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.