This is a pretty simple problem, but im getting myselft confused...

i want to get the name of the page that i am on... so for example:

if i am on
http://www.mysite.com/page.php?id=12&y=15

i want to be able to extract:
page.php?id=12&y=15

Now i test my pages on IIS but my live server is Apache

now ive tried SCRIPT_FILENAME and SCRIPT_NAME

on IIS SCRIPT_FILENAME gives me undefines variable and SCRIPT_NAME gives me the whole path ie: /php/home/myfile.php

on Apache SCRIPT_FILENAME gives me the whole path and SCRIPT_NAME gives me +- what i want /myfile.php (i just have to get rid of the / ).

So...to get
page.php?id=12&y=15
from
http://www.mysite.com/page.php?id=12&y=15

i need to do the following:
get SCRIPT_NAME (/page.php)
$page = remove the / (using ereg replace)
get QUERY_STRING
make the string: $page."?".QUERY_STRING

This should work on Apache right? or is there a better way of doing it? cause this seems like a lot of work for something which should be quite easy?