homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

How to only accept Requests from specific site..?
.htaccess redirect

10+ Year Member

Msg#: 436 posted 11:36 pm on Oct 24, 2001 (gmt 0)

.htaccess file support to redirect a request
for one page to other page.

I wonder if there is a way to control the access
request to the files of some directory by
only allowing requests redirected from
specific link or site.

For example.

If .htaccess file redirect
request for A to B(on the other site),
there is any way to allow access requests
from only A to B.

I want to block any direct access to B and
only allow access from A.

It's unusual case... but I cannot move data
on B to A and it's not possible to create same
.htaccess file automatically because A and B
are located on different machine (site).



WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 436 posted 12:16 am on Oct 25, 2001 (gmt 0)

If your server is set up to allow you to do so, you could put this in your .htaccess file for site B

SetEnvIfNoCase Referer "domainA\.com" local_ref=1
<FilesMatch "page\.html">
Order Allow,Deny
Allow from env=local_ref

This will only allow triffic with site A to hit "page.html" on site B.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved