I am trying to migrate a php-website running the symfony framework to nginx and php over fastcgi.
It all works well usining the Symfony howto from http://wiki.nginx.org/ but I run into trouble with a custom rewrite rule.
My goal is to rewrite urls of of the form /aaaa to /view/shorthand/aaaa. The request should then be handeled by php and symfony.
Old apache rewrite rule:
RewriteRule ^([0-9a-f]+)$ index.php/view/shorthand/$1 [L]
Nginx rules i have tried:
rewrite ^/([0-9a-f]+)$ /view/shorthand/$1 break;
rewrite ^/([0-9a-f]+)$ /index.php/view/shorthand/$1 break;
They all get sent to fastcgi but the request_uri still seems to be /aaaa since I get this error:
FastCGI sent in stderr: "Action "aaaa/index" does not exist" while reading response header from upstream
I have also tried using try_files without any luck. Please advice.