PDA

View Full Version : no sub-page bookmarking...


pwillner
7-17-02, 03:46 AM
Is there a way to set up my site so when a visitor bookmarks it while viewing a sub-page the index page address is the one that is recorded. My intent is to stop people from entering on sub-pages therefore skipping my index page.
Thanks,
Pete

Laurey
7-17-02, 12:03 PM
There may be a way to do this via scripting of some sort.. maybe someone else could answer that, but the only way I know is to use frames, and place all the pages other than the framset page in a separate directory and add a robot.txt blocking that separate directory.

HTH
-L

RSaucier
7-17-02, 12:37 PM
You may be able to use .htaccess to redirect all requests to your home page if the referrer is not a page on your site.

Check the htaccess tutorials at help.powweb.com and look for the anti-leeching tute. What you're looking for is similar to this.

Robert

pwillner
7-17-02, 02:59 PM
Thanks for the replies. I had found a site that was set up like that and did not use frames. I plan on looking for it again today to see if I can gleem some info.
Thanks again,
Pete

grendel
7-17-02, 04:20 PM
cool!

When you find that page with the details, can ya please post a link to it here?

TIA!

pwillner
7-17-02, 06:06 PM
I haven't found it yet but i'm still looking!
Pete

pwillner
7-17-02, 06:17 PM
O.K., explain this to me. If you go to this page http://www.globalsurfnews.com/ and click on a news link, it shows the same address, but if you open that same link in a new window it shows a different address.

This is the page I was looking for before because if you bookmark the news story it records and returns you to the index.
Pete

Laurey
7-17-02, 06:32 PM
hmm... I clicked the first story.. and opened in another browser. worked as you said. Bookmarked the story in the browser showing the long bookmark (real url). Opened another browser.. hit the boomark.. and it took me to the story.. not the index page. So.. I guess this would only work if they don't open another browser to view (you could turn off right click ability I suppose to disallow that).

As to how they did it, if you look at the source, they are using frames.

-L

pwillner
7-17-02, 06:40 PM
I hadn't looked at the source yet...sorry, but the odd thing is that when I open the bookmark in a new browser I go back to the index.
Pete

BerksWebGuy
7-17-02, 06:45 PM
Its a little cloaking code that you can use will doing frames. Many e-commerce companies do this since they change their stocks often and do not want you to bookmark a certain page (cause it may not be there next time).

You add the cloak code in a 'hidden' frame and this keeps the main site in the address bar. If they bookmark...they will bookmark the main address. But if they access a certain page from another site, it will go to that page with the page address in the address bar(without the cloaking frame).

Laurey
7-17-02, 06:47 PM
My guess would be that you bookmarked from the page you got to by regular clicking the link (ie: NOT the one you opened the link into a new browser window with).

hth ;)
-L

pwillner
7-17-02, 06:58 PM
BerksWebGuy,
Any idea where I can find this "cloaking code" and do you know if it works cross browser?

Laurey,
You lost me but i'll take your word for it.
:)
Pete

BerksWebGuy
7-17-02, 07:08 PM
Here's a little snipet...its pretty simple. Just add it to your source page for the frames.

<FRAMESET rows="0,*" Border=0 frameborder="0">

<!--Below is where you enter the address you want showing in your visitors browser address bar-->
<FRAME src="http://www.yoursite.com" SCROLLING=NO>

<!--Below is where you enter the address you want showing in the browser window-->
<FRAME SRC="http://www.yoursite.com/reg/username/today/" SCROLLING=auto>

<noframe>
<body>
<p>
This page uses frames, but your browser doesn't support them.
</p>
</body>
</noframes>

</FRAMESET>

Laurey
7-17-02, 07:18 PM
Heya Pete ;)

LOL. . sorry I lost you.. thought you were right next to me :)

clearer (hopefully):

What I *think* happened:

you left-clicked a link taking you to the next page, URL in bar was the index page only.. not the full URL.. this is the one you bookmarked.

instead of that, what I did was right-clicked, opened in new window, URL in bar was the full URL.. this is the one I bookmarked.

Hence.. they behaved differently :)

Clear as mud now?*g*
-L

pwillner
7-17-02, 07:38 PM
BerksWebGuy,
Thank you, I will give it a try.

Laurey,

Clear as mud now?
At least it's not in my eye!;) And yes, now I understand.
Thanks for all the replies,
Pete