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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display different URL?

Status
Not open for further replies.

xenology

Programmer
May 22, 2002
51
US
Is there a way to display a different URL in the web addess bar instead of the actual page the user is on? For example, they may actually be on but I want the address in the toolbar to display
FYI - so they will always bookmark the main site and not a page within and not be able to identify directory structure of the server.

Thanks!
xeno
 
not sure why on earth you would want to annoy visitors by making sure when they arrive on your site they then have to search again for the information they bookmarked, when there are plenty of other places that don't force them to. But hey it's your loss!

your only choice is to use frames!

And btw if you do use frames and need SE results, forget them.





Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Like Chris says, you can do it with a frame - just make point to a page like this:
Code:
<html>
<head>
<title>My Irritating Website</title>
</head>
<frameset rows="*" cols="*">
<frame src="realfirstpage.htm">
<noframes>
<a href="realfirstpage.htm">Enter the site</a>
</noframes>
</frameset>
</html>
The address bar will remain unchanged as you move from page to page in the site.

HOWEVER, search engines will index the real pages in your site and send surfers there - you'd have to add some sort of javascript thingy to each page to check to see if it's being displayed in a frame and redirect if it isn't.

I suspect that visitors could bookmark a framed page by right-clicking on it, though you'd certainly screw up most attempts to do so (why would yow want to?).

Anybody who cared about the directory structure of your server could identify it very easily, either by right-clicking or by viewing the source of your pages.

You'll make life a lot easier for yourself and your visitors if you don't waste time faffing about trying to hide URLs.

-- Chris Hunt
 
Thanks for the info guys. I'll try your suggestion out.

FYI, the reason for the hidden URL is not intended for the entire site, just for four pages that are related to security and administration and must be filled out in sequence. Any modifications to the records are done on other pages. I didn't want to have to include a lot of code to verify previous pages were filled out correctly or that the user didn't just bounce to a page out of order. I figured the easiest way to accomplish this would be to not let the user know where or what page they were actually on.
I do appreciate the forwarneings from everyone though!
Happy Coding!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top