navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Hiding URL

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Hiding URL
Page: [1]
 
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
Hiding URL - 4/15/2003 5:36:10   
Hi,

Has anyone any ideas on how to hide a URL from the address bar in the browser? I have some javascipt to generate a password protected login that leads to a ' Contacts' page but I don' t want the browser to display the URL of that contacts page when it is reached.

Any help would be appreciated.

Grant
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: Hiding URL - 4/15/2003 7:16:15   
You would probably find it easier to leave the display of the URL alone as you can find it in more than just the ADDRESS bar....however you can use a Javascript to control where the user comes from. I would suggest looking for a javascipt that will allow you to set the page that the visitor MUST COME FROM in order to view your contact page, if they attempt to view the contact page from a bookmark, for example, they will be redirected to a login request page....

Try looking here or maybe here

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/15/2003 12:05:34   
Justjay

Great idea but I just can' t get it to work!

I' ve added the following script (taken from one of the references you gave) to the Contacts page:


<script>
<!--

var validreferrals=new Array()
validreferrals[0]=" http://www.javascriptkit.com/script/cut170.shtml"
validreferrals[1]=" http://javascriptkit.com/script/cut170.shtml"
var passed=0

for (r=0;r<validreferrals.length;r++){
if (document.referrer.indexOf(validreferrals[r])!=-1){
passed=1
break
}
}

if (passed==0){
alert(" Access to the page denied!" )
history.go(-1)
}

//-->
</script>

But it still refuses to let me in even if I come from a vaild page.

Any ideas?

Many thanks.

Grant



(in reply to GrantB)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: Hiding URL - 4/15/2003 12:19:42   
Thats because you didnt change what pages you could come from as a valid referral -->

validreferrals[0]=" http://www.javascriptkit.com/script/cut170.shtml"  
validreferrals[1]=" http://javascriptkit.com/script/cut170.shtml"  


So here is my idea...change the pages that are valid referrals and then it should work

< Message edited by justjay -- 4/15/2003 12:20 PM >


_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/15/2003 13:05:14   
Sorry, didn' t make it clear but I had already changed the valid referral pages. I just pasted the original code.

So I' m still stuck.

Cheers,

Grant

(in reply to GrantB)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: Hiding URL - 4/15/2003 13:21:25   
Can you post the code that you changed?

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 4:27:46   
Here you go:

<script>
<!--

var validreferrals=new Array()
validreferrals[0]=" http://www.keynshamsquashclub.org.uk/conlogin.htm"
validreferrals[1]=" http://www.keynshamsquashclub.org.uk/contacts.htm"

var passed=0

for (r=0;r<validreferrals.length;r++){
if (document.referrer.indexOf(validreferrals[r])!=-1){
passed=1
break
}
}

if (passed==0){
alert(" Access to the page denied!" )
history.go(-1)
}

//-->
</script>


The ' conlogin' page successfully directs me to the ' contacts' page but every time it shows the ' Access to the page denied' alert.

I do appreciate your help.

Grant

(in reply to GrantB)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: Hiding URL - 4/16/2003 7:38:45   
Try removing this line...since you don' t want people to bookmark that page....

validreferrals[1]=" http://www.keynshamsquashclub.org.uk/contacts.htm"  


_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 7:43:25   
Hi

Line removed but the script still doesn' t work!

Any other ideas?

Grant[:j]

(in reply to GrantB)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: Hiding URL - 4/16/2003 8:19:45   
Okay I have given it a whirl and can' t get it to work either. To the best of my limited JS knowledge everything looks right so I am just as lost with you on this one...

So know I can suggest 2 options...

#1 - find another script
#2 - since you have FrontPage Server Extensions you could create a sub-web called contacts, set the page that has your contacts as the index page of this sub-web and then use FPSE permissions to password protect this subweb by turning off anonymous browsing and then setting up users

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 8:21:55   
Okay,

Thanks for your help anyway.

Grant

(in reply to GrantB)
abbeyvet

 

Posts: 5095
From: Kilkenny Ireland
Status: offline

 
RE: Hiding URL - 4/16/2003 9:55:54   
No answer for your specific problem, but I would caution against using JavaScript to protect anything if it is in any way important that it be protected. It is invariably easy peasy to get around.

_____________________________

Katherine

:: InKK Design :: InKK Domains

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 11:09:41   
Hi Katherine,

Point taken. The web site involved is just run for the local squash club. I wanted to add members contact details but in some way password protect it so that the ' general public' could not get to it easily. Understandably, members of the club are a little bit nervous about having their phone numbers and email addresses posted on the WorldWide Web!

Javascript. I believe, would be good enough and Justjay' s suggestion of checking where the referrer came from would be ideal - if it only worked!!

I don' t suppose you have any suggestions?:)

Regards,

Grant


(in reply to GrantB)
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: Hiding URL - 4/16/2003 11:47:08   
Wht not password protect the pages w/ .htaccess?

_____________________________

Gil Harvey, 1947-2004

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 11:52:12   
Gil,

Please forgive my ignorance. How do you do that?

Grant

(in reply to GrantB)
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: Hiding URL - 4/16/2003 12:08:04   
First, I assume everyone is on a Unix/Apache server - my bad. If you are then take a look here: http://bignosebird.com/passwd.shtml

_____________________________

Gil Harvey, 1947-2004

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 12:20:11   
It' s a Linux server so no joy I think.

Any other ideas?

:)

(in reply to GrantB)
Justjay

 

Posts: 697
From: Montreal, QC Canada
Status: offline

 
RE: Hiding URL - 4/16/2003 12:35:42   
You can still use .htaccess if your Adminstrator has allowed it. But keep looking at JavaScripts...there are more than one...However my comments about using a subweb would be more secure than a JS

_____________________________

JustJay
thejehm.net Web Solutions
SAH Link Exchange
Serious About Hosting

(in reply to GrantB)
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: Hiding URL - 4/16/2003 12:36:22   
quote:

It' s a Linux server so no joy I think.


I should have said *nix - Linux supports .htaccess great.

_____________________________

Gil Harvey, 1947-2004

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/16/2003 13:48:29   
I agree with Justjay in that I think that Javascript will suffice if I could only get it to work! :)

My latest attempt is:

<SCRIPT LANGUAGE=" JavaScript" >

<!--

var previousurl=" http://www.keynshamsquashclub.org.uk/conlogin.htm"

if (document.referrer!=previousurl)
{
//alert previousurl
alert (" Access only permitted via Login Page" )
history.go(-1)
}

//-->

</script>


For some reason, the object ' document.referrer' is not correctly checking the previous URL.

Has anyone else any ideas? I' d be extremely grateful! [:j]

(in reply to GrantB)
Nancy

 

Posts: 3626
Joined: 11/9/1999
From: Nebraska
Status: offline

 
RE: Hiding URL - 4/18/2003 2:58:14   
Maybe this is something that will work for you:

http://www.supernovacomputers.com/cgi-bin/main?doc=freepass


Nancy


_____________________________

Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.

(in reply to GrantB)
GrantB

 

Posts: 13
From: Bath, UK
Status: offline

 
RE: Hiding URL - 4/18/2003 4:33:21   
Thnaks Nancy,

I' ll give it a go.

Grant

(in reply to GrantB)
Page:   [1]

All Forums >> Web Development >> General Web Development >> Hiding URL
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts