change rewrite for nginx

Edho P Arief edhoprima at gmail.com
Thu Aug 6 11:44:13 MSD 2009


On Thu, Aug 6, 2009 at 8:05 AM, Big Bet<lists at ruby-forum.com> wrote:
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . plus.php [L]
>
> how to change it for nginx ?
> help me

probably something like this

try_files $uri @plus;

location @plus
{
  fastcgi_param SCRIPT_FILENAME $document_root/plus.php;
  ....
  ....
}

or if you're feeling lazy

error_page 404 = /plus.php;

this probably works, too

try_files $uri /plus.php;

or this

try_files $uri @plus;

location @plus {
  rewrite ^.* /plus.php;
}

-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org





More information about the nginx mailing list