On my website, I have the following files:
- index.html
- apple.html
- banana.html
- pear.html
index.html has links to the three other pages.
What is the easiest way to block access to the 3 pages (apple.html/banana.html/pear.html) unless their referrer came from a page which was on my website?
I have seen solutions where people put their website domain as the only referrer allowed. The problem with this is that I would have to set my domain every time, since I might upload my website to 10 different domains.
Is there any way to code the .htaccess so that it automatically detects the website domain where it's kept and use that as a reference to which referrer needs to be allowed?