Results 1 to 8 of 8

Thread: Hide my real url

  1. #1
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hide my real url

    I have my own website which I self host. I also have another domain where I will serve more of my website, including a forum and classifieds. I want to hide or mask the url of the second domain name so people think they have never left my original domain.

    Is this possible?

    If so, how is this done?

    Thanks

    Neil

    Meant to add that the original site and the new site are both PHP

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can't hide the url that is in the address bar.

    You can, however, include the page with php from another server.

    <?php include('http://your.other/site.htm'); ?>

    And you can base this on the URL, if you want, like:
    yourfirst.com?p=path/to/page/page.htm

    Then php can show that from the other server with:
    <?php include('your.other.com/'.$_GET['p']); ?>

    You could also do a complex set of pairs, like "page1"->"something.htm", if you wanted it to not have the real paths/names of the other server.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Let the name calling begin.

    I know this is a really thick thing to say, but, can you explain with a little more detail what you mean and how it would look to the visitors of my site?

    Cheers,

    Neil

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    If you used his first idea. You'd have to have 2 sites. or perhaps 1 site, and a subdomain. Although that would not be hiding the url.
    Jeremy | jfein.net

  5. #5
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    You can look in using rewrite rules. Do you use one server to host more domains or are there more servers?

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, what I said pretty much explains how it would look.

    On the first server, you would make an index page. In the url you would include the path/filename of the page you want to see on the other host. In your script you would just grab that variable from the url and display that on the page.

    If I went to:
    http://www.yourfirstserver.com/?p=files/stuff/page.htm

    Then it would load exactly from:
    http://www.yoursecondserver.com/files/stuff/page.htm

    If you used the code, and only this code, on your first server's index.php page:
    <?php include('http://www.yoursecondserver.com/'.$_GET['p']); ?>

    I can try to explain in more detail if you'd like, but that's basically it.

    You could also do more things to the $_GET['p'] variable, like make it a word "page1" which corresponds to a path/filename, if you'd prefer, or just disallow protected pages (you'd make a list), etc.

    Alternatively, you could look into using rewrite rules. (Server configuration-- google should explain more.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Aug 2007
    Location
    Ohio
    Posts
    79
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Default

    The short answer is no. It is not possible.

    I'm not up for the longer answer. It involves one site acting as a proxy, and honestly, it's not worth it just for the sake of masking a url. Either build onto one site what you need in it's own interface, or live with separate urls.

  8. #8
    Join Date
    Aug 2008
    Location
    Estados Unidos
    Posts
    26
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    I know this isn't what your looking for but have you thought about using frames in html?

    HTML Code:
    <FRAMESET ROWS="*">
      <FRAME SRC="URLofSECONDserver.html" NAME="main">
    </FRAMESET>
    Your url will be visible if they view page source, but otherwise they'll just see what ever address you place the frames page on. Frames suck for many reasons including not being listed correctly on search engines but if it's only import to mask the url to the average idiot, what the heck.

    Good luck
    Last edited by jeaux; 08-24-2008 at 07:48 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •