Rewrite for Zend Framework

Igor Sysoev is at rambler-co.ru
Wed Nov 7 09:44:36 MSK 2007


On Wed, Nov 07, 2007 at 09:39:50AM +0300, Igor Sysoev wrote:

> On Wed, Nov 07, 2007 at 01:29:36PM +0700, Huan Truong wrote:
> 
> > Hi all,
> > 
> > I hav difficulties creating rewrite rules for 
> > Zend_Controller_Router_Rewrite according to 
> > http://framework.zend.com/manual/en/zend.controller.router.html
> > 
> > The apache rewrite rule was:
> > RewriteEngine on
> > RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
> > 
> > But when I ported this to nginx:
> > 
> > location / {
> > root /home/my_home/public_html;
> > if ($request_filename !~ "\.(js|ico|gif|jpg|png|css)$") {
> >  rewrite ^(.*) index.php last;
> > }
> > index index.php;
> > }
> > 
> > It didn't work. I always received this error message when requesting an 
> > url (http://my-site.com/test/) from nginx: No input file specified.
> > 
> > Please help. Thanks in advance.
> 
>       location  /   {
>           fastcgi_pass   ...
>           fastcgi_param  SCRIPT_FILENAME  /home/www/scripts/php/index.php;
>           ...
>       }
> 
>       location ~ \.(js|ico|gif|jpg|png|css)$") {

-       location ~ \.(js|ico|gif|jpg|png|css)$") {
+       location ~ "\.(js|ico|gif|jpg|png|css)$") {

>           root /home/my_home/public_html;
>           ...
>       }

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list