There is various resources on this topic, but I am still unsure why is $_SERVER['SCRIPT_URL'] unavailable, on both of my machines, on one is PHP running as PHP-DSO and on another is running as PH FascCGI with suEXEC.
I am dumping $_SERVER variables, have turned on RewriteEngine in script directory .htaccess but I still can't see this variable. Of course, official documentation ie empty.