Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Page 1 of 2 12 LastLast
Results 1 to 15 of 24

This is a discussion on Hiding url in the Shared & Semi-Dedicated forum
Hello, How can I keep one url on the browser's navigation bar while visiting different sections of my site? For instance if the main url ...

  1. #1
    JPC Guru
    Join Date
    Nov 2002
    Location
    Panama
    Posts
    305

    Hiding url

    Hello,

    How can I keep one url on the browser's navigation bar while visiting different sections of my site? For instance if the main url to my site were www.toly.com/home.php and I would go to www.toly.com/page1.php while I'm on page1.php I would like the browser's navigation bar to keep displaying www.toly.com/home.php as the url. I don't know if this can be done with the .htaccess.

    Thanks.

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    The easiest way to do it would be to put your site in a frame. Make your index.html page as follows and then all of your pages will load in the frame while the location bar keeps the url of the frame page:

    <html>
    <head>
    <title>Your site name</title>
    </head>
    <frameset rows="*">
    <frame src="page1.html">
    </frameset>
    </html>

    I'm not sure if that's 100% correct (its been a long time since I've worked with frames, so you amy need to spend a little time tweaking it, but that's the gist.

    Note that you may have problems with this setup if your users can't view framed content. You could try adding the page1.html content to a <noframes> section in index.html, but then you'll end up with two separate versions of the same content. Also, wit some browsers, when a user tries bookmark your page they'll only get you home page, not the info they are looking for.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Originally posted by jason
    The easiest way to do it would be to put your site in a frame...
    Yikes!!!
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  4. #4
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    This might help you, if you read between the lines...

    http://www.thesitewizard.com/archive...icstatic.shtml
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  5. #5
    JPC Guru
    Join Date
    Nov 2002
    Location
    Panama
    Posts
    305
    The easiest way to do it would be to put your site in a frame.
    Well, frames is something I really would like to avoid. Because of the reasons you mentioned and some others too.

    This might help you, if you read between the lines...

    http://www.thesitewizard.com/archiv...micstatic.shtml
    That link shows you how to display your .php pages as .html. Actually I was looking for that command a couple of days ago.

    Thanks both anyways. It wasn't really a big deal.

  6. #6
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    I'm afraid frames is just about the only way, with the bookmarking issue as the big minus.

    There would be another way: effectively having only one page on your website, the index, and displaying everything on that very dynamic page. You'd still have the exact same bookmarking issue though.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  7. #7
    JPC Addict
    Join Date
    May 2003
    Location
    Canada
    Posts
    141
    Perhaps this page would be interesting. Its not exactly what you are looking for, but its something similar. Basically faking a directory using htaccess and mod-rewrite.
    Memento Mori

  8. #8
    JPC Guru
    Join Date
    Nov 2002
    Location
    Panama
    Posts
    305
    There would be another way: effectively having only one page on your website, the index, and displaying everything on that very dynamic page. You'd still have the exact same bookmarking issue though.
    Actually I didn't want to show variables in the url. That was mainly the reason for having this option.

    Perhaps this page would be interesting. Its not exactly what you are looking for, but its something similar. Basically faking a directory using htaccess and mod-rewrite.
    It's a cool trick. Was trying to think a way of using it but there's no way for what I want.

  9. #9
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    You needn't show variables in the URL to do that. Instead you'd turn all your internal hyperlinks into form submit 'buttons' which 'submit' a variable that tells you what to display next.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  10. #10
    JPC Guru
    Join Date
    Nov 2002
    Location
    Panama
    Posts
    305
    You needn't show variables in the URL to do that. Instead you'd turn all your internal hyperlinks into form submit 'buttons' which 'submit' a variable that tells you what to display next.
    Well, that would affect my site design for one and with so many links I have, it would be a pain to switch everything to buttons.

    Thanks though.

  11. #11
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Hahahaha! Hey, Toly, I gotta ask, bro... This is a fun game and everything, but why do you want to fool everyone into thinking they are one the same page on your site. I don't understand why you want to do this.

    Maybe if you could explain WHY you want to do this, we could be of more help to you.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  12. #12
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I agree with Vin--what's the point here?

    Another idea is to use the single index page but put all of your content in invisible layers, Then use JavaScript to turn layers on and off.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  13. #13
    JPC Addict
    Join Date
    May 2003
    Location
    Canada
    Posts
    141
    I can think of one reason why youd want to hide a url. If youve got a download of some kind and you dont want people to view the exact location of the file.
    Memento Mori

  14. #14
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    I put 'button' between quote marks because it normally is a button but doesn't have to be. You should be able to work with any type of 'look'.

    But I do agree with the other guys: what really would is the point behind this wish? I don't mind the mental excersize, but I'm starting to doubt that it's gonna do you any good or that you even understand much of what is written here.

    Jason: wouldn't that layer stuff make for a huge page? One would actually download the whole site at once then, right?

    Raven: there are better ways for that. You can place the download off your web-root and have PHP serve it up to the authorized user. This means the location of the file is not only kept secret but simply not reachable from the web. (Works for all 'normal' files, only certain types of streams seem to have a problem with it, because PHP messes with the headers a bit.)
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  15. #15
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Originally posted by Gwaihir
    Jason: wouldn't that layer stuff make for a huge page? One would actually download the whole site at once then, right?
    It certainly would, unless you tried to dynamically load javascript files to create the layers. You might be able to pull that off with IE 6 (and maybe 5) or Netscape 7, but it woundn't work on any of the other browsers.

    Another idea, although I'm still asking why?--all fo this seems overly complicated to me. Use an index.php page to control what is displayed. Then use JavaScript to set cookies that I dentify what "page" you're requesting before the request goes to the server. Again, it won't be bookmarkable and won't work with cookies turned off.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Page 1 of 2 12 LastLast

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
  •