My situation may be the following:

I've got a file named mylogic.php. This file is known as from two different Web addresses (/url1.php &lifier /url2.php).

What I wish to archive would be to then add headers towards the response only when mylogic.php is utilized from /url1.php.

Experts: Have you got a workaround for this problem?

THANKS ahead of time.

would you like to do that inside your htaccess, or perhaps is something similar to

if( $_SERVER['REQUEST_URI'] == '/url1.php' ) header('WeirdStuff: x');


$_SERVER['PHP_SELF'] consists of the title from the primary PHP script (i.e. /url1.php or /url2.php). You can look at the need for this variable and send the header if this matches the URL you would like. Something similar to:

if ($_SERVER['PHP_SELF'] == '/url1.php') {