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.
On Wed, Nov 07, 2007 at 01:29:36PM +0700, Huan Truong wrote:
But when I ported this to nginx:
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)$") {
root /home/my_home/public_html;
...
}
On Wed, Nov 07, 2007 at 09:39:50AM +0300, Igor S. wrote:
RewriteRule !.(js|ico|gif|jpg|png|css)$ index.php
location ~ \.(js|ico|gif|jpg|png|css)$") {
Igor, it worked perfectly.
Thank you!
PS: Btw,…
Igor S. wrote:
On Wed, Nov 07, 2007 at 09:39:50AM +0300, Igor S. wrote:
On Wed, Nov 07, 2007 at 01:29:36PM +0700, Huan Truong wrote:
location ~ \.(js|ico|gif|jpg|png|css)$") {