I am trying to setup a guide inshtaccess that only is applicable when the asked for page was rerouted from the particular domain. In other words, if abc.com rerouted for this page, I would like it to redirect again to another page. I figured of referer, but apparently the initial referer is generally maintained. Is this done?

May be the example you describe a person that clicks link/form on-site A, is distributed to Site B that redirects for your site and you'd like to learn the user originated from Site B?

If so, then if you fail to create a switch to the code on-site B e.g. to place one more querystring parameter around the redirect (or maybe this type of parameter already is available), then there's nothing within the request that will explain the user originated from Site B i.e it's not possible.