http://www.example.com/somedirectory/home.php
I have .pdf files and .doc files as well as .php and .html files in another directory
http://www.example.com/directory2/example.doc
/directory2/
example.doc
page.pdf
index.html
page.php
I only want the directories under directory2 to be served to the client if the referrer comes from only the one single above page in my domain. And if this is not the case, redirect the user to the following page:
http://www.example.com/access_error.php
How do I construct the .htaccess file so that this will work under Apache Tomcat?? I have been researching this for many days now, and need it for a project I’m doing. I know it’s something small and silly, I just can’t figure it out, and I want to be able to copy the .htaccess to other directories, and add it to new directories down the road. So the .htaccess file needs to only effect the directory it’s in. Any help would be greatly appreciated.
Sincerely,
Haley Miska
Web Programmer
I have been trying to find something on this topic (because I wanted to protect few folders on my site), but I wasn’t able to solve this problem properly… So now I am using .htaccess only (IP: deny, allow).
]]>[...]
]]>