Forum Moderators: open

Message Too Old, No Replies

Show a different domain in the browser?

I want to redirect to a new page but show the same domain in the browser

         

lizzie

10:13 pm on Dec 30, 2003 (gmt 0)

10+ Year Member


I want to re-direct imperceptably to a new page without showing the change of domain in the browser window. Seems I read somewhere you could do this but don't remember how, javascript maybe?
Or show a different domain in the browser window from the actual one. Is this possible?

macrost

11:18 pm on Dec 30, 2003 (gmt 0)

10+ Year Member



[webmasterworld.com...]

I just don't want to know why you exactly want to do it. Note, this works for only IE I believe.
Mac

Conard

11:25 pm on Dec 30, 2003 (gmt 0)

10+ Year Member



You could also do it with a hidden frame.

sidyadav

4:32 am on Dec 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Note, this works for only IE I believe.

Nope, this one:
  • Works the best with IE,
  • Almost works the best with Opera
  • Sort'a works with Mozilla

    dunno about the others though.

    regarding your question:
    You could do this if you have your own domain, and want to show content from another domain, enter this in the index page of your own domain, changing the domain-to-include.com value:
    <?php
    include("http://www.domain-to-include.com");
    ?>

    make sure the index page is index.php.

    Sid

  • lizzie

    5:58 am on Dec 31, 2003 (gmt 0)

    10+ Year Member


    Yes Sid yes, that's it! Now all I need to do is block viewing of the source code, not just by clicking but also from the "View-Source" button in the browser.

    Also: where do I put <?php
    include("http://www.domain-to-include.com"[smilestopper]);
    ?>

    Do I put it in the body of index.php? That is so perfect.

    sidyadav

    6:24 am on Dec 31, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Yep, just put that in the index.php page, and nothing else, I'm sure theres a script where you can block the "View Source" etc.

    Sid

    thehittmann

    9:40 am on Dec 31, 2003 (gmt 0)

    10+ Year Member



    what you want to do is called url cloaking, theres many posts on this site about cloaking just search.

    if you cloak the cloaked source will show when you view > source. Right click will show the actual page source code and you can turn off right click using a java script.

    although this still will not stop anyone from viewing your source as there are still so many other ways to view the source that you can no turn off.

    In fact if people have something to hide it makes me want to know what it is so I get around all this other stuff just so I can have a look.

    if you want to make it harder completely code your HTML in ASCII and then it will just look like a bunch of jibberish to most people. But this can also be converted in a blink of an eye.

    sticky me though if you want more ASCII convertor info

    lovnthesun

    12:11 pm on Dec 31, 2003 (gmt 0)

    10+ Year Member



    Lizzie-

    This is very simple. You need to purchase domain masking from your domain registrar. It will forward the domain to another address, but still show the name you want in the browser.

    Val

    jomaxx

    5:34 pm on Dec 31, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    A few points...

    1. Whichever path you choose, this will work a lot better if you control both sites. Disguising another person's website as your own can be legally dubious and there are ways they can block it if they find out.

    2. With the PHP approach, your server will presumably have to download the source from the remote site and then transmit it to the user. That will be quite a bit slower and have a lot more bandwidth overhead than simply using a hidden frame.

    3. I haven't tested it, but it also seems likely that relative links to images, .js files, CSS files and HTML pages would not work with the PHP approach. There may also be a problem setting cookies. You can work around this if you own both sites.

    lizzie

    5:49 pm on Dec 31, 2003 (gmt 0)

    10+ Year Member


    The hidden frame idea is nice and what I would like to do is hide the BOTTOM of the page that I am showing in the frame.
    No I'm not trying to hide the copyright, there is just some info on the bottom of that page I would rather hide. I need people to see all of that page except the very bottom. How can I do this with a frame?

    jomaxx

    6:02 pm on Dec 31, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    I can imagine ways to accomplish something like that, but frankly I don't think I want to facilitate you doing so. If you don't own the other site, then IMO what you are proposing would cross the line between "dubious" and "illegal".

    lizzie

    6:12 pm on Dec 31, 2003 (gmt 0)

    10+ Year Member


    You don't know WHAT I am doing. Don't assume I am copying someone else's site. It is NOT what I am doing. I can understand why you think that but I assure you I am not doing that. What I am doing is strictly legitimate. I'm not so stupid I want to or need to copy someone else's page. I don't want to tell you here everything I am working on though in an effort to get you to stop judging me.

    The php method does not work. Here is what the index.php page when I open it in my browser: Warning: Failed opening 'https://www.domain-name2.com' for inclusion (include_path='.:/usr/local/lib/php') domain-name1.com/index.php on line 3

    I think I'll try the frames method. How can I block the bottom of the page from view?

    thehittmann

    4:29 am on Jan 1, 2004 (gmt 0)

    10+ Year Member



    make the frame height shorter than the page height with no scrolling="no"

    lizzie

    2:49 am on Jan 6, 2004 (gmt 0)

    10+ Year Member


    Thanks the hitman, that is what I did, it works great!

    IeuanJ

    8:59 am on Jan 6, 2004 (gmt 0)

    10+ Year Member



    Well it's simple to hide any part of the page IF you control the source code of that page. Simply give the <div> and id tag (e.g. <div id="hideme"> and in css do:

    #hideme {
    display : none;
    }

    There, piece of page not displayed. If you're not using divs then you should be, plus it should work with a table too.

    However, despite your claims to ebing doing something legal you are not willing to say what which leads to it's own insinuations. You know already it is illegal to pull information automatically (e.g. stock quotes) without permission and hiding the bottom of a page would point towards hiding logos and copyright info from the user.

    The other main reason for hiding portions of text I have seen is in order to spam search engines, i'm sure you've all seen the way some sights contain a full dictionary of words hidden (white on white) at the end of a page. This is not illegal but is not condonable at all for any serious designer.

    The only possible valid reason I could think of for wanting to hide urls and code would be to hide the parameters passed in a querystring so that users cannot manually alter them. However if you are doing anything this way that could cause damage then you seriously need to think about doing this another way.

    Likewise the only reason I can legitimately think of for a hidden frame is for it to hold hidden variables but again there are better ways of doing this.

    I suggest if you want more help on questionable techniques you should provide more details of what you are doing.

    lizzie

    2:25 am on Jan 9, 2004 (gmt 0)

    10+ Year Member


    I have an information page from a parent company of mine I want to show potential customers without them seeing certain internal company links. There are many things in the world you may not have thought of.

    nickknowledge

    3:50 am on Jan 9, 2004 (gmt 0)

    10+ Year Member



    Hi Lizzie,

    The PHP script is failing because it can't reference the file, and is then searching under the PHP root.

    Save this code as "includeme.php":

    <?
    include "mycontent.inc";
    ?>

    and then in the same directory, save this as "mycontent.inc":

    <html>
    <head>
    <title>Successfully included</title>
    </head>
    </body>mycontent.inc successfully included</body>
    </html>

    When you then serve "includeme.php", your browser should then change to reflect the inclusion.

    To replicate the error you were getting, move the "mycontent.inc" file up a directory, and you will get an error similar to:

    Warning: main(): Failed opening 'mycontent.inc' for inclusion (include_path='.;c:\php4\pear') in C:\Webdesign\includeme.php on line 2

    Hope this helps.

    Regards,

    Nick.

    IeuanJ

    10:41 am on Jan 9, 2004 (gmt 0)

    10+ Year Member




    You don't know WHAT I am doing. Don't assume I am copying someone else's site. It is NOT what I am doing. I can understand why you think that but I assure you I am not doing that. What I am doing is strictly legitimate. I'm not so stupid I want to or need to copy someone else's page. I don't want to tell you here everything I am working on though in an effort to get you to stop judging me.

    Sounds very dodgy like you're hiding something.


    I have an information page from a parent company of mine I want to show potential customers without them seeing certain internal company links.

    Thank you for the explanation, see it wasn't that hard was it :o). And I apologise for not thinking of everything.

    Your best bet is a simple server side include or the equivalent in PHP if you wanted to display the whole page, but seeing as you want to hide some of it that wont work without some other kind of server side scripting as well to strip out the bits you want, rather than just hiding them.

    This is much more difficult and to be honest at that stage I would seriously think it is easier just to create a seperate page on your clients site without the extra information present.

    lizzie

    12:03 am on Jan 10, 2004 (gmt 0)

    10+ Year Member


    The information page has statistics that change every day. Anyway I used a frameset.