cancel
Showing results for 
Search instead for 
Did you mean: 

Hosted Website (CCGI) repointing to another host and port number

FIXED
TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Hosted Website (CCGI) repointing to another host and port number

Hi folks,

I currently have a domain hosted with plusnet for years, and recently moved it onto CCGI and word press. I know I could repoint it using a CNAME record to another host, but would like to repoint to another host and specify the port number.  For example mydomain.com -> mynewdomain.com:8000

 

As in the CCGI site we are using PHP, is this possible. or do I need to use the default port numbers?

Thanks in advance

Tony

8 REPLIES 8
dvorak
Moderator
Moderator
Posts: 29,473
Thanks: 6,623
Fixes: 1,482
Registered: ‎11-01-2008

Re: Hosted Website (CCGI) repointing to another host and port number

If you have access to the DNS records then you can do it using SRV records, but iirc you’ll need a sub domain.
Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Re: Hosted Website (CCGI) repointing to another host and port number

I do have access to the DNS records, but won't that only alter the DNS name and not repoint the port?

I assume you mean the DNS records for the hosted domain under "Additional DNS records (Advanced)"

Regards

Tony

dvorak
Moderator
Moderator
Posts: 29,473
Thanks: 6,623
Fixes: 1,482
Registered: ‎11-01-2008

Re: Hosted Website (CCGI) repointing to another host and port number

Have a read of https://en.wikipedia.org/wiki/SRV_record
Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Re: Hosted Website (CCGI) repointing to another host and port number

Looking at the admin port for a domain hosted by plusnet then I can only specify A, CNAME or MX records not SRV.

That would put this option off the table correct?

Regards

Tony

dvorak
Moderator
Moderator
Posts: 29,473
Thanks: 6,623
Fixes: 1,482
Registered: ‎11-01-2008

Re: Hosted Website (CCGI) repointing to another host and port number

Yeah, I've never use the PN DNS tools.
Other option is to have a redirect on load of the mydomain.com to mydomain.com:port.
So if anyone ever hits standard port 80 it gets an auto redirect.
Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Re: Hosted Website (CCGI) repointing to another host and port number

So basically I will need an nginx type solution on the target server.

Or can the php scripts that are running on the PN CCGI not do this?

Regards

Tony

dvorak
Moderator
Moderator
Posts: 29,473
Thanks: 6,623
Fixes: 1,482
Registered: ‎11-01-2008

Re: Hosted Website (CCGI) repointing to another host and port number

Fix
Why not just set up a php redirect as the homepage for the site?

header("Location: http://example.com/myOtherPage.php");
die();
Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Re: Hosted Website (CCGI) repointing to another host and port number

Actually that got me thinking and I did a mixture of this PHP command and also mod_rewrite in the .htaccess files.

Basically the main .htaccess file I had it deciding which folder to go to /folderA /folderB and where I wanted the redirect to the other domain and port, then I just changed the index.php file in that folder to do the redirect.

Thanks for you suggestion and help

Regards

Tony