The Zend Framework based site I have been working on is now being migrated to its production server. This server turns out to be nginx (surprise!). Naturally the site does not work correctly as it was developed on Apache and relies on an htaccess file.
My question is... anyone have any experience with this? Any ideas on how to translate what the htaccess file does to an nginx.conf file? I'm researching this but am hoping someone already has experience with this. Thanks!
EDIT: This is the current htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /index.php [NC,L]
I know it's a pretty old thread but it might help some people anyway.
Basically it redirects any 404 error to index.php, but if the file exists (type file) it will set the right root.
I did it from the top of my head. It might not be working right away, and you have to put the right path and fastcgi config. I also put everything back to index.php as it should work like that with Zend_Framework
I don't know of any automatic/systematic way to convert the htaccess-file, you'll probably have to do it manually. The Nginx wiki is the best resource for nginx documentation.
Edit: I'm running Zend Framework on Nginx myself now and the config looks like this:
As you can see, the rewrite rule itself is very simple.