I want to restrict access to a folder on my server so that visitors may only access the contents (a web application) via links in the same domain. Can I do this using .htaccess? To be clear, I simply want to prevent direct access to the contents so that visitors are routed through other pages on my website in order to get there.
I think something like this might work:
I'm haven't tried this, but it should work. Some explanation: