Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    May 2003
    Location
    Calcutta
    Posts
    24

    Default cname url redirect

    Hi all
    I need some help with cname redirects.

    i want to redirect a subdomain like a.b.com to yahoo.com/some/page.html.

    while looking like it was still at a.b.com

    I can redirect to domains like yahoo.com but not pages on the site.

    Anyone have an idea ?

    Thanks

    Aquitaine

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    422

    Default

    Hello,

    You don't really want to be using CNAME's for that purpose.

    Here is an example of when a CNAME can be used

    You have xyz.com hosted on your box and its dns is hosted elsewhere (Say zoneedit.com hosts the dns)

    You can make an A records to point to the IP on your server for xyz.com

    Now if the IP of xyz.com changes, you have no control over the dns, so it would be up to the client to change the IP at zoneedit.com - potentially the site would be offline.

    You can use a CNAME in this example as follows.

    Instead of adding A records pointing to your server IP, assuming the account is using the same IP (shared IP) that the server hostname uses, they could use a CNAME for www.xyz.com to point to your.server.com - that way if the IP changes, no changes need to be made by clients who use 3rd party dns.

    You could setup a subdomain and place an index.php file with a redirect header , to point to the page on yahoo that you wanted to, or use .htaccess

    PHP header redirect

    <?php header("Location: http://www.yahoo.com/page.html");
    ?>

    You could use .htaccess or a META tag within the index page of the sub dir too.

    If you want the browser to show your address, then you need to create a page that uses frames, to load a the top portion (frame) on your server, and the lower frame loads the remote URL.

  3. #3
    Member
    Join Date
    May 2003
    Location
    Calcutta
    Posts
    24

    Default what im trying to do

    hey digitaln thanks for the reply,
    i managed to figure that part out for myself, but what im trying to do is have an affiliate script installed at say abc.com and use affiliate.xyz.com look like its abc.com

    Now if i was just dealing with a domain name it wouldve worked fine, but the problem is that the url is like
    abc.com/affiliate/page.html

    So a 0 frame would work best, but i dont know if cookies would get set and it might ruin the whole purpose of the affiliate program if it tracks via cookies which im sure it does.


    Anyone else have any ideas on how this sort of thing could be setup ?

    Thanks

    Aquitaine

  4. #4
    Member
    Join Date
    Sep 2004
    Posts
    422

    Default

    I suppose it would depend upon which affiliate script you are using - try a frames page and test it out or ask the affiliate script provider what they recommend or other users of it, to see what they do.

Similar Threads & Tags
Similar threads

  1. CName Redirect ?
    By fluxlabs in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-15-2010, 06:03 PM
  2. Cname, subdomain to a specific url... HELP pls!!!
    By andreaf in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-03-2009, 10:49 AM
  3. CNAME Problem Cannot redirect properly
    By mohdyasar in forum cPanel and WHM Discussions
    Replies: 13
    Last Post: 03-22-2008, 11:50 AM
  4. how to cname my URL to other server?
    By Neiltan in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-08-2008, 10:12 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube