Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL freezing

Status
Not open for further replies.

magicandmight

IS-IT--Management
Aug 27, 2004
77
US
Is there a way, besides frames, to make the URL that is displayed in the address bar say whatever url you want? One of my programmers cannot figure out how to make one of our website stop from changing from the url you enter to a url declaring a dedicated server. Would be really helpful if there is a way. Thx.
 
There's ajax. You can change the content of the pages via ajax and you will never see the address in the address line change.
 
Ooo... you can use a frameset to do it (although that's hardly a justification to use them).

You can use server-side redirects (and .htaccess directives) to achieve this. Are you using PHP (or some other server-side technology)?

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
[URL unfurl="true" said:
http://www.adaptivepath.com/publications/essays/archives/000385.php[/URL]]
How Ajax is Different
An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary an Ajax engine between the user and the server. It seems like adding a layer to the application would make it less responsive, but the opposite is true.

Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine written in JavaScript and usually tucked away in a [red]hidden frame[/red].

Ooooh!

Clive
 
We are using PHP, as for the AJax I have never heard of it so I will have to research to see if we can use that.
 
Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine written in JavaScript and usually tucked away in a hidden frame.

That's interesting.
Granted I have a scant knowledge of Ajax, but I understand the principle.. or I thought I did.
From what I though I understood there is no reason at all to hide anything in a "hidden frame". I don't get it.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Is there a way, besides frames, to make the URL that is displayed in the address bar say whatever url you want?
If your question is "How do I make the URL in the address bar different to the real one for the page being viewed", the best approach is to use a frame. Sure, it gets in the way of bookmarking and linking, but that appears to be what you want. It won't be much of an obstacle to any marginally competent hacker, and search engines will probably ignore the frameset and link direct to the real pages, but it will do the job you're asking for. I don't see any point in adding the (considerable) complication of new-fangled Ajax when frames already offer a well-established, stable means of doing the job.

If, on the other hand, you want to make it look like your pages come from a different server to where they really are, you'll need to do something server-side. Maybe you can use mod_rewrite to do it on apache servers, or you could write a program which, when it's called like this:

[tt]www.foo.com/show.php?page=somepage.php[/tt]

it reads [tt]www.bar.com/somepage.php[/tt] and prints it out.

Frankly, I wouldn't bother with any of it. If your visitors are reading the address bar instead of your pages, you need to write more interesting pages!

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
foamcow said:
From what I though I understood there is no reason at all to hide anything in a "hidden frame". I don't get it.
You are totally correct in your understanding. There is no reason to hide anything in a hidden frame for AJAX functionality. I think the description on that site is a bit "dumbed down" and written for last century web developers.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Jesse James Garrett the author on the dumbed-down site in question is the one who started the Ajax nonsense.

BTW Ajax messes up bookmarking so we had better not use it.

Not to worry! I have a new technology that combines HTML, PHP and CSS. It is called VIM - Visual Interface for Morons. :)

Clive
 
It was his description of AJAX that I referred to as "dumbed down"... not the site in general. And specifically it was his generalisation about the use of hidden frames.

CliveC said:
BTW Ajax messes up bookmarking so we had better not use it.
Once again CliveC shows us how petty and small minded he can be. For those of you interested... CliveC defends the use of framesets (and frames) for pretty much everything - and refuses to accept that bookmarking frameset content is problematic. This was discussed to extremes on this thread: thread253-1180038 - and his comments here relate directly to that thread.

CliveC said:
I have a new technology that combines HTML, PHP and CSS. It is called VIM - Visual Interface for Morons.
And not to be mis-understood, here he is again... this time trying to tell us (as professional developers who use HTML, CSS and in many cases PHP) that we are "morons". Or is he saying that we are developing things for "morons". Or is he belittling our profession?

Hear that? That's not us laughing with you, CliveC.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
BabyJeffy said:
CliveC defends the use of framesets (and frames) for pretty much everything - and refuses to accept that bookmarking frameset content is problematic.

RCIS

In the frameset thread:thread253-1180038
clivec said:
I will concede that bookmarking a frameset is difficult in fact almost impossible without some serious workarounds.

Clive
 
BabyJeffy said:
And not to be mis-understood, here he is again... this time trying to tell us (as professional developers who use HTML, CSS and in many cases PHP) that we are "morons". Or is he saying that we are developing things for "morons". Or is he belittling our profession?

Actually Jeff you did misunderstand. First of all I use HTML & CSS and my preference for server-side is PHP. I was making light of the notion that an author takes existing technologies and make out that he has created something new. VIM is a unilever product similar to AJAX & COMET.

Sorry if you or anyone else was offended.

Clive
 
Clive, that truly is an amusing spoof. As it says on the bottom of the page:
website said:
This is a spoof article. Please compare it with the original and you will see how little it has been changed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top