Solved

Use frames to hide actual URL

Posted on 2006-12-01
5
183 Views
Last Modified: 2012-05-05
I would like the url of my site to remain constant when people are clicking around.

This is temporary while I present a site to a potential client.

Anyways, I think it can be done in frames, can't it?

0
Comment
Question by:edvinson
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:gamebits
ID: 18058479
Hi edvinson,

A frame will give the url of the site but not the url of specific pages

Gamebits
0
 
LVL 1

Author Comment

by:edvinson
ID: 18058603
Ok good. We are on the right track.

Now, how do I "wrap" an entire site? So the user sees "example.com" at the top, no matter what they click on?

THanks.
0
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
ID: 18059371
You start by creating a page with the frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <meta name="generator" content="CSE HTML Validator Professional (http://www.htmlvalidator.com/)">
</head>
<frameset>

<frame name="content" scrolling="yes"
noresize src="http://www.newgamebits.com/TEST/content.html">

</frameset>
</html>

The src attribut point to the default page (home page) that will open when somebody navigate to your url.

Every link that you put on your webpages now will have to target the frame

example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <meta name="generator" content="CSE HTML Validator Professional (http://www.htmlvalidator.com/)">
</head>

<body>
<h1>hello world</h1>
<a href="http://www.newgamebits.com/TEST/000.html" target="content">Try this</a>
</body>
</html>

As you can see on the first script I named the frame "content" (<frame name="content")
and as you can see with the link I target the frame ( target="content">).

You can see it work by trying this link

<a href="http://www.newgamebits.com/TEST/frame.html">try it</a>

NOTE: If I had put the frameset in my index page at newgamebits.com you would not see the /TEST/frame.html all you would see would be www.newgamebits.com

Gamebits

0
 
LVL 1

Author Comment

by:edvinson
ID: 18059805
Exactly what I needed.

0
 
LVL 28

Expert Comment

by:gamebits
ID: 18059812
Thanks for the points and the grade.

Gamebits
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now