NameSilo

Can I manage URL forwarding on my own VPS hosting account?

SpaceshipSpaceship
Watch

Erdy

VIP Member
Impact
115
Hi,

I have many domains. Each of them is URL forwarded to a different URL like this:

mydomain1.com is forwarded to http://www.sedo.com/search/details.php4?domain=mydomain1.com
mydomain2.com is forwarded to http://www.sedo.com/search/details.php4?domain=mydomain2.com
mydomain3.com is forwarded to http://www.sedo.com/search/details.php4?domain=mydomain3.com

Of course I can do URL forwarding on my domain registrar. For instance if the domain is registered at Godaddy I should login to my Godaddy account and manage the URL forwarding over there. But I don't want to do this. I want to manage the URL forwarding myself using my hosting account. I want to go to my domain registrar, let's say Godaddy and set my nameservers like this:

mydomain1.com uses ns1.mywebsite.com and ns2.mywebsite.com
mydomain2.com uses ns1.mywebsite.com and ns2.mywebsite.com
mydomain3.com uses ns1.mywebsite.com and ns2.mywebsite.com

Then I want to control the URL forwarding myself. Can you give me any direction? I have no idea how to achieve this. What should I be searching for? Where do I go from here? How is this going to work?

Thanks
Erdinc
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Hey Erdinc,

I did this on one website using php. You would want to extract the host from $_SERVER['HTTP_HOST'], and determine the redirect based on it.

Here would be an example for the above domains:

Code:
<?php

$host = strtolower($_SERVER['HTTP_HOST']);

$url = 'http://www.sedo.com/search/details.php4?domain=%s'

$target = sprintf($url,$target);

header('Location: '.$target);

Then you just add the domains as a pointer domains, as you need them. Haven't tested the above but it should work.

Cheers,

Jay
 
0
•••
Thanks Jay,
I will try this.
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
NameMaxi - Your Domain Has Buyers
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back