Granting access with htaccess from specific referrers
I don't think the title is a very good description, but I'm wondering if its possible to make an .htaccess file that only grants access from a specific referrer.
That is, if you go to type in "site.com/folder" into your address bar, it won't let you go there, but if you click on a link from a specific page, it'll let you in.
That is, if you go to type in "site.com/folder" into your address bar, it won't let you go there, but if you click on a link from a specific page, it'll let you in.
Comments
Try looking through these examples.
<a href="http://stephenjungels.com/jungels.net/articles/mod-rewrite-recipes.html" target="_blank">http://stephenjungels.com/jungels.net/arti...te-recipes.html</a>
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?specificsite.com/.*specificpage.html.*$ [NC]
RewriteRule \.(gif|exe|filetypesyouwanttoprotect|zip|png)$ - [NC,F,L]<!--c2--></div><!--ec2-->
You're "in" if you came from the "specific" referrer. 403 error if not.
If that doesn't give you want you need, I won't be much help. I offer the above only because I've been using it for years to accomplish the very same thing you described.