ezsystems/ezpublish-community — pull request #184 by crevillo (2014-09-14 11:30:23+00:00)
Title: Fix EZP-23344 render_hinclude not working with nginx

Fixes https://jira.ez.no/browse/EZP-23344

Installing ezpublish-community in nginx and following exactly the instructions given in https://github.com/ezsystems/ezpublish-community/blob/master/doc/nginx/nginx.rst makes render_hinclude calls throw a error 500.

If fact, a AccessDeniedHttpException is thrown from the symfony [FragmentListener](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php#L88).

Doing some debug i found that there seems to be a problem with the way the urls was given to the urlSigner in order to know if request are valid of not.
Basically, while in apache uris from the hinclude call are in this way
```
http://[host]/_fragment?_path=...
```
with nginx urls seems to add another _fragment. like this
```
http://[host]/_fragment?/_fragment&_path=...
```
Because of that, signer seems to doesn't trust the url and throws the Exception.

I think this is because last nite in the provided rewrite rules where the ? is not needed.