![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2003
Posts: 1,630
|
htaccess question
I want to allow access to a folder only from links on certain pages. I know how to do this if pages are on the same domain. I have this code:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*domain.com/ [NC] RewriteRule /* http://domain.com/enter.php [L,R] But what if I want to allow access from several different domains and several different pages? Is that possible with htaccess? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jul 2007
Location: Intraweb
Posts: 274
|
I just got up so might be wrong, but i'm pretty sure in this case you can just add more of these lines..
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*domain.com/ [NC] one for each domain, and it should work. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Feb 2001
Location: Maryland, USA
Posts: 870
|
Check this out
http://www.htaccesstools.com/hotlink-protection/ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2003
Posts: 1,630
|
It looks like it is working
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |