#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    How to redirect same A level IP address to different Pages


    Hello everyone,


    Here is my question: All the clients would have changed their A level settings to point to the same IP for mydomain.com BUT how does that same IP redirect to the proper page for each client?



    Here is the scenario:

    I have a main domain with folders/pages for each client.
    mydomain.com/client1/clientpage
    mydomain.com/client2/clientpage

    The clients have a subdomain on their own domain.

    Ex. Subdomain.client1domain.com
    subdomain.client2domain.com

    client changes their A level settings from cpanel to point the ip of mydomain.com.

    When a customer goes onto:

    Subdomain.client1domain.com they really are seeing

    mydomain.com/client1/clientpage

    without the customer knowing, ie. it looks like subdomain.client1domain.com in the nav bar but is really:

    mydomain.com/client1/clientpage

    When a customer goes onto:

    subdomain.client2domain.com they are really seeing
    mydomain.com/client2/clientpage

    The question is this: All the clients would have changed their A level settings to point to the same IP for mydomain.com BUT how does that same IP redirect to the proper page for each client?

    Ie. client 1 subdomain shows: mydomain.com/client1/clientpage
    Client 2 subdomain shows: mydomain.com/client2/clientpage

    But both have the same IP in their A level settings. How to achieve this?
  2. #2
  3. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,149
    Rep Power
    4103
    Originally Posted by Ziring
    how does that same IP redirect to the proper page for each client?
    It doesn't. The IP just points to your server, that is it.

    What you need to do is then configure your http server to inspect the Host: header sent by the browser and respond appropriately.

    How exactly you do this depends on what server software you use. With Apache for example you could either make separate <VirtualHost> blocks for each domain or your could use mod_rewrite.
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo