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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-15-2009, 08:03 AM   #1
donnie
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?
donnie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2009, 08:32 AM   #2
ScriptWorkz
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.
ScriptWorkz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2009, 08:39 AM   #3
Lightning
Confirmed User
 
Industry Role:
Join Date: Feb 2001
Location: Maryland, USA
Posts: 870
Check this out
http://www.htaccesstools.com/hotlink-protection/
Lightning is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2009, 09:16 AM   #4
donnie
Confirmed User
 
Join Date: Jan 2003
Posts: 1,630
It looks like it is working Thank you both!
donnie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.