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

    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Mod_rewrite or utopia?


    Hi there,

    I read the "MOD REWRITE Guide & Common Requests" but honestly I don't understand if possible or not departing from A.com in order to get to B.com/C/d.html, keeping visible in the address bar A.com/C/d.html

    Any help will be really appreciated.
    Thanks.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    It is not possible.

    If A.com and B.com are hosted on the same server, then you could configure Apache to serve both domains from the same code base. Thus B.com/C/d.html would point to the same file as A.com/C/d.html. The address bar would still show whatever domain you used to access the site.

    If A.com and B.com are hosted on different servers, then you could configure the A.com server to act as a proxy server for B.com. So the user sends a request to A.com for /C/d.html, then A.com sends a request to B.com/C/d.html, then it returns the result back to the user.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0
    Actually the domain A is not on the same server of domain B.

    A "DNS Service" is activated for domain A.com. It allows to manage the A record by setting up the IP corresponding to the host (B.com) on which is configured a "DNS Zone" named A.com.
    So basically the structure is like this:

    B.com
    |_ /html/
    | ___|_ .htaccess
    | ___|_ index.php
    | ___|_ /C/
    | ______|_ d.php
    |
    |_ A.com
    ___|_ /html/
    ________|_ .htaccess
    ________|_ index.php

    In the root folder of A.com we can then upload an .htaccess file correctly configured.

    My aim is to keep visible in the address bar the full path from the starting point.

    Request for
    A.com/C/D/

    should serve content from
    B.com/C/d.php

    About the other direction, if someone explicitly asks for
    B.com/C/d.php

    I don't care, so change in domain names absolutely is not needed.

IMN logo majestic logo threadwatch logo seochat tools logo