How do I restrict access to a particular URL ?

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

How do I restrict access to a particular URL ?

Post by Thunderstone »




Someone asked:

At 12:20 PM 6/4/1999 -0400, you wrote:


Along the line, I'm wondering how one could restrict access to requests
from a specific Web page.

I tried various methods of the above with HTTP_REFERER instead of
REMOTE_ADDR but without success.

At one time I fiddled with the access configuration on the server (using
the .htaccess file) but crapped out on that, too.

Is there a simple and effective way to confine successful searches to those
requested from specific URLs?

Thanks in advance.

Montgomery Kersell
Toronto, Canada


Read *Today's* Newspaper Editorials and Opinions
More Than 600 English Newspapers From Around The World
http://www.opinion-pages.org


User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

How do I restrict access to a particular URL ?

Post by Thunderstone »




Use $HTTP_REFERER . This example would deny all access but from 2 urls:

<$allow=">>=http://www\.yoursite\.com/search.html"
">>=http://www\.yoursite\.com/texis/webinator/search/"
>
<rex $allow $HTTP_REFERER>
<if $ret eq "">
<html><body bgcolor=white>
Access denied.
</body></html>
<exit>
</if>




Post Reply