Rewrite Rules HELP needed

Glen Lumanau glen at lumanau.web.id
Tue May 5 15:04:59 MSD 2009


Is that posibble not to use it on root dir?

Just change location / to location /test

------Original Message------
From: Igor Sysoev
Sender: owner-nginx at sysoev.ru
To: nginx at sysoev.ru
ReplyTo: nginx at sysoev.ru
Subject: Re: Rewrite Rules HELP needed
Sent: May 5, 2009 5:56 PM

On Tue, May 05, 2009 at 02:51:40PM +0400, Igor Sysoev wrote:

> On Tue, May 05, 2009 at 04:58:43PM +0700, Glen Lumanau wrote:
> 
> > Can you please tell me how can I translate this rewrite so it can work with
> > nginx?
> > 
> > DirectoryIndex index.php
> > 
> > RewriteEngine on
> > 
> > RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
> > 
> > RewriteCond %{REQUEST_FILENAME} !-f
> > 
> > RewriteCond %{REQUEST_FILENAME} !-d
> > 
> > RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
> 
> root ...
> 
> location / {
>     try_files  $uri  $uri/  /index.php$uri$is_args$arg;

-     try_files  $uri  $uri/  /index.php$uri$is_args$arg;
+     try_files  $uri  $uri/  /index.php$uri$is_args$args;

>     index index.php;
> }
> 
> locaiton ~ \.php($|/) {
>     ...
> }
> 
> location /images { }
> location /css { }
> location /js { }
> location = /robots.txt { }
> location = /favicon.ico { }
> 
> 
> -- 
> Igor Sysoev
> http://sysoev.ru/en/

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



Best Regards,

Glen Lumanau
-
Sent from my BlackBerry®


More information about the nginx mailing list