HTTPS redirections

Forgive me if this is posted in the wrong forum.

I am aware of PHP, sessions and header/redirection, but I am curious about
other methods/scripting languages that redirect client-side requests from
specific links within a webpage. I have noticed how some websites only
allow access to a particular page if a link within the page has been
'clicked' ie. user cannot paste link address in browser bar to get to
desired page. For security purposes I would like to create a script and
achieve similar results. Some rendition of CGI... apache modules maybe??
Any insite into how is this implemented; more specifically, how is this
implemented using HTTPS?

Thank you.

synt3gra IT Solutions