View Full Version : URL Cloaking...
Jimmy
05-24-2000, 10:51 AM
Hi,
I was trying to cloak the URL in the address bar so that it will stay the same even if visitors are re-directed to another page or another site.[nbsp][nbsp]Could anyone help?
Thanks.
Jimmy
Use frames.[nbsp][nbsp]Make one frame 100% in the frameset.[nbsp][nbsp]Could be annoying... but I suppose you've got good reason ;)[nbsp][nbsp]
Drew
[This message has been edited by Drew (edited 05-24-00@11:06 am)]
Jimmy
05-24-2000, 11:34 AM
Thanks Drew,
Is there any other way beside using frames? I am trying to stop visitors to bypass my main page and go directly to my
forum page.
Stephen
05-25-2000, 12:21 AM
i'd avoid the frames. i tried this. problem is that placing cgi scripts within frames can lead to inconsistent behavior. try using the mozilla browser this way and you'll discover what i mean. if you do use frames netscape seems to require a minimum of 2 frames in a set, so something like:
rows="0, 100%" does the trick with the first dummy frame given by <frame> and the second with all the relevant info for the actual cgi destination.[nbsp]
wolfstalks
05-25-2000, 12:36 AM
I remembered seeing this javascript at this location:
http://www.easyjavascript.com/javascript.html
It sounds as though it would do what you want???
(Edit:[nbsp][nbsp]Sorry after posting I went back and checked and it seems as though this only works for Netscape)
Hope it helps.[nbsp][nbsp]I have cut and pasted the instructions from the above page below.
Have a Good One
Bob
This is a good script if you do not want people accessing
your page without going though your site first. I use it on
my page because Infoseek only has my right frame
indexed. Now if someone sees my link on Infoseek and
clicks on it the whole page will load and not just the right
frame!
This is how you use the script! Put these lines into your
<head></head> tag! You need to change YOUR
REDIRECTION PAGE (The page that you want to load)
and YOUR BASE URL (Mine is
"http://www.calpoly.edu/~dpopeney/").
<script language="JavaScript">
<!-- Hide from old browsers
// Copyright © 1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com
function check(){
[nbsp][nbsp]referingDoc = document.hide.ref.value
[nbsp][nbsp]if (referingDoc != ("")){
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]if[nbsp][nbsp](referingDoc.indexOf("YOUR BASE URL") == -1){;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]window.location = "YOUR REDIRECTION PAGE"}
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]}
}
// -->
</script>
Now put this inside your body code.
<body onLoad="check()">
An example is:
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000"
VLINK="#000080" ALINK="#000080" onLoad="check()">
or
<body onLoad="check()">
Now put this after your bady tag in your HTML document.
<form name=hide><input type=hidden name=ref></form>
<script>
document.hide.ref.value = document.referrer;
</script>
[This message has been edited by wolfstalks (edited 05-24-00@12:47 pm)]
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.