It took me a while to find out why global redirect simply didn't work at all. But after some searching, the following is happening:
when php is running in fast-cgi mode, it's possible $_SERVER['SCRIPT_NAME'] is empty due to various reasons. It's available in $_ENV though. See issues: http://www.php.net/manual/en/reserved.variables.php#55475 and/or http://bugs.php.net/bug.php?id=38141

Attached is a patch againts 6.x-1.0 which fixes my installation. I've asked my sysadmin also for some more specifications to see if we can document this further.

CommentFileSizeAuthor
globalredirect_server_vs_env.patch1.13 KBswentel

Comments

nicholasthompson’s picture

Version: 6.x-1.0 » 7.x-1.x-dev
Priority: Normal » Minor
Status: Needs review » Closed (won't fix)

The code looks good - however this looks very much like some kind of PHP/Apache bug or maybe even a system config issue. If I start to get a lot of issues about this crop up as more people advance to PHP 5 then I'll implement it, but I believe$_SERVER is the proper array to use rather than $_ENV...

Thanks very much for the patch though, its certainly something worth bringing to light.