![]() |
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? |
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. |
Check this out
http://www.htaccesstools.com/hotlink-protection/ |
It looks like it is working :) Thank you both!
|
All times are GMT -7. The time now is 03:56 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123