Solved

Use frames to hide actual URL

Posted on 2006-12-01
5
188 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Extracting content from meta tag PHP MYHTML DOM 3 34
Do alert on select 6 26
How to calculate height of a text using jquery 3 40
ASP sending two datas 2 22
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

679 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