Hi @berserk77,
Do you want to check the referer link? In that case you can read the $_SERVER[‘HTTP_REFERER’] value and act on that.
If your site excepts multiple domain names and you want to change content based on that domain you can check the $_SERVER[‘SERVER_NAME’] value.
Hope that helps,
Stephan
https://developer.wordpress.org/reference/functions/wp_get_referer/
Look at this code look for the variable or the reference added by a WordPress module.
This function performs a redirect with no default value, the false shown below. return wp_validate_redirect( $ref, false );
This function use allowed_redirect_hosts
It is a good example for coding.