Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Hiding source of links

Hiding source of links
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Dec 2, 2002, 12:02 AM
 
I have a bookmark page that I want to conceal the location of. Are there any ways i can do with? By somehow sending all my links through a cgi maybe? I don't care if people can see the cgi, as long as they can't get back to the bookmark page itself, you know
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Dec 2, 2002, 06:17 AM
 
is this the kind of thing you're after?
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Dec 2, 2002, 09:33 AM
 
I'm not sure I understand.

What do you mean by "you want to conceal the location" of the page? Do you not want people to be able to access the page? If that's so, then a password-lock would be the easiest way of doing that.

Do you want to prevent people from linking directly to the page? A script would work best for that; check a person's HTTP_REFERER header and if they haven't clicked from a page in your site then bounce them off elsewhere (note, however, that this will also prevent people from bookmarking your page).

Do you want people to see the page, but don't want them to see the URL? A redirection CGI isn't quite the way to go for that (they will see the URL that way). Rather, make a CGI or other script which does nothing but include the page, and give the CGI some other address. Or, if you have Apache, you could use mod_rewrite to bounce the page's real address off to a 404 page, and set up a false address which goes to the page. But why don't you want people to be able to see the URL, anyway?

Are you trying to make it so people can't see where your links are going to, even in the source of your page? That's pretty tricky, but some particularly skanky JavaScript could help you there. Link the JavaScript as an external file, and make that file a script which filters out who's allowed to access it by User-Agent. That will keep the casual script-kiddies out, though it can be broken by someone with more know-how and determination. But again, why would you want to do this?

Are you trying to link to sites but mask people's HTTP_REFERER headers, so that the other site won't know it came from you? That, my friend, is where it gets tricky. You'd have to create a script which deals with raw HTTP, to forge the referer headers, and then your links would all have to go through that script. Certainly this is doable, but it's a fair bit of work. Why would you want to do that? Are you trying to deep-link somewhere that doesn't allow it?

In short, there's many ways to do this stuff, but what exactly is it that you want to do?
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Dec 2, 2002, 11:22 AM
 
My bookmark page is for my own personal use ONLY. What I want to do is use some method so that pages that I link to don't have paths to my bookmark page in their web logs. YOu get it?
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Dec 3, 2002, 06:47 AM
 
ok i've got a simple javascript solution for ya

http://212.19.82.70/tests/javascript/redirect.htm

is the page with the code. Say you want to go to www.apple.com, link to

http://212.19.82.70/tests/javascript...=www.apple.com

now their referrer logs will state redirect.htm instead of your bookmark page.

feel free to rip off my source code
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Dec 3, 2002, 10:12 PM
 
Originally posted by derbs:
ok i've got a simple javascript solution for ya

http://212.19.82.70/tests/javascript/redirect.htm

is the page with the code. Say you want to go to www.apple.com, link to

http://212.19.82.70/tests/javascript...=www.apple.com

now their referrer logs will state redirect.htm instead of your bookmark page.

feel free to rip off my source code
Holy Complicated?!?!?! Hows about a simple perl or php that will let me add my links to the end like that? and block the true referer?
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Dec 4, 2002, 06:47 AM
 
Well pardon me!

How is that complicated? All you do is stick that page somewhere on your server, and link to it.

It's a lot less complicated than Perl or PHP for the simple reason it will work on any server you care to upload it on, no messing around with enabling PHP or making the PERL script executable.

Anyway my PHP is a bit rusty these days, but this should work:

[?
$theLink=$HTTP_GET_VARS[link];
$theProperLink="http://$theLink";

header("Location: $theProperLink");
?]

Now link to your php page

eg
link.php?link=www.apple.com


edit: remember to change the [ brackets to pointy ones
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:25 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2