Page 1 of 1

Mod_Rewrite Folder/Site Blocking

Posted: Sun Sep 10, 2006 12:41 am
by tecktalkcm0391
OK, this might seem a bit weird but this is the only way I can have it set up.

I have a site setup, with a folder in it. (Site.com/Folder)
I have another site (site2.com) hosted on that server that gets its files from (site.com/folder)
How can I block people from going to site.com/Folder, but not from site2.com.

I've already tried:

Code: Select all

AddModule mod_setenvif.c
SetEnvIfNoCase Referer www\.site2\.com SITE_1
SetEnvIfNoCase Referer site2\.com SITE_2
<Files>
Order deny,allow
Deny from all
Allow from env=SITE_1
Allow from env=SITE_2
</Files>
and...

Code: Select all

RewriteCond %{HTTP_REFERER} !^http://site2.com/.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://www.site2.com/.*$     [NC]
RewriteRule .*\.*$        -                  [F]
HELP!