I'd expect placing the try_files outside a location block, as dwfreed suggested, should make it work. Unless you need rules specific to "location /" (rules that shouldn't apply to subdirectories), it shouldn't be used since anything outside a location block is normally global to the entire virtual host.
One thing I just noticed was the "=404" in your PHP block's try_files. Normally that would be good to keep for security (hence why I missed it -- I'm used to seeing it in my own config), but could interfere with your rewrite. It
could be interfering with the rewrite by sending a 404 before the rewriting the URL. Try using the same exact try_files you use earlier in your configuration; if it doesn't work, you can always re-add the "=404".
If removing the "=404" makes you nervous, some other tips to mitigate the risk can be found on Nginx's wiki
in this article.
If that doesn't make your rewrite work, and nobody can figure out why, than my suggested if statement may be your best option. obs is right, try_files should be used instead of an if statement, but if try_files won't work, you'd be best using an if statement instead.
Two suggestions to clean up your configuration:
*Place gzip_static and index in nginx.conf within the http block. That will make both apply to ALL your virtual hosts.
*Unless you have a specific need to override the settings in fastcgi_params, your PHP block should need only try_files, include, and fastcgi. If removing all else causes it to stop working, you can find a working fastcgi_params
in this Nginx wiki article (it's the one I use, so I know it works).
Edit: removing square brackets in the above list (can't get phpBB's list working).