Forum Moderators: phranque

Message Too Old, No Replies

redirect when bookmarked

bookmarks

         

mateo

8:12 pm on Jul 30, 2003 (gmt 0)

10+ Year Member


I hope this is in the right area if not I am very sorry.
I have a small problem I want to be able to stop bookmarks or to redirect a bookmark to the main site, in other words I have a member sire asp iis5 and don't want members bookmarking the page I really want them to first go to the main site, Is there a way when a person bookmarks the page the main page URL is entered instead.
I was thinking of perhaps using a cookie or scripts that checks where they came from and if the person did not come from the main site I would then redirect them there. Any ideas would be greatly appreciated.
Thanks,
Mateo

Dreamquick

6:37 pm on Jul 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could simply check the referer server variable, if its not your site then they are either using a typed/bookmarked/off-site URL or they have something like Norton blocking it for them.

In my mind it's between the referer and cookies, now cookies are more foolproof but should the client not accept cookies your site could end up leaving them in an infinite loop.

Please bear in mind that unless you specifically code around it then blocking bookmarking will also stop any spider from deep crawling your site.

- Tony

mateo

7:51 pm on Aug 1, 2003 (gmt 0)

10+ Year Member



Hi Dreamquick,
I really don't mind if the spiders see the members area,
here is the concept,
I have to sites, site1.com and site2.com
site 1.com is the main site with all the links and so in, site2.com is a members only site, people are bookmarking site2.com and never going to site1.com I want everyone to go to site1.com first click the link to site2.com then go there. site1.com is on a UNIX box site to is on IIS we use asp on site2.com so that I can program, I can't find a way to really keep from bookmarking, I used to do it by using frames (not an option) and since site 1 is a different IP it shouldn't be a problem to use a referrer script. I would appreciate any other ideas you have and thanks you for your last answer
Mateo