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

    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    Mapping From the Domain Name


    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. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,066
    Rep Power
    9398
    When the browser requests the page at (what it thinks is) subdomain.client1domain.com, it includes that domain name in the request to the server. The server then looks up that name in its configuration and sees that it should serve a site based out of a certain directory.

    Your server has "mydomain.com" set up to run out of (for example) /var/www. It also has "subdomain.client1domain.com" set up at /var/www/client1, and "subdomain.client2domain.com" at /var/www/client2.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    This is a duplicate of another thread in the DNS forum and has been answered already.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,066
    Rep Power
    9398
    Well, at least I didn't waste too much time on my reply.

IMN logo majestic logo threadwatch logo seochat tools logo