Closed Hywan closed 11 years ago
I tested with nginx and php-fpm. I'm calling http://test.imagineapp.com/foo/bar/
and here is the output for $_SERVER['SCRIPT_NAME']
:
[SCRIPT_NAME] => /foo/bar/index.php
If I call http://test.imagineapp.com/foo/bar/bar/baz
with rewritting enabled, the result is the same.
So it seems that the content of $_SERVER['SCRIPT_NAME']
is the same for apache and nginx.
Thanks!
Done 2897e77fadcf40567acf07f869d634b65091c67b.
Hello,
It would be great to have a magic way to autoset the prefix. Indeed, it's annoying if the user always needs to call the
Hoa\Router\Http::setPrefix
each time he is moving an application or changing server configuration.On Apache, we can use the
$_SERVER['SCRIPT_NAME']
value but it does not work with the PHP internal Web server. Does it work with other Web servers?Any other ideas?