Given a homepage at domain.com (e.g., https://example.com/), I want:
- outside requests to only be able to visit the homepage and no subpages
- that homepage to successfully redirect visitors to a subpage (for example,
https://example.com/page1.html)
I can accomplish #2 with some simple JavaScript and window.location.href = example.com/page1.html. But for #1, is there a way to reject access to internal pages if the referrer is coming from my domain.com? Basically the flow I'm looking for is:
- outside visitor visits
https://example.com/ https://example.com/redirects visitor to, for example,example.com/page1.html- any attempt to visit
example.com/page1.htmldirectly fails with a 404
I get that this may all seem nonsensical in terms of what it does. That's by design. I want a website that sends visitors to internal pages, but only if they get there through the homepage redirecting them to it.