Re: Optimize rewrite

2013-06-20 Thread Anto
Ok, thanks !!! ;-) 2013/4/4 Reinis Rozitis > >> location / { >> rewrite^/(.*)/(.*)$ /$1/index.php?url=$2; >>} >> > > I would suggest to use try_files: > > location / { >try_files $uri $uri/ /index.php?url=$uri&$args; > } > > > Personally instead of pasing the uri

Re: Optimize rewrite

2013-04-04 Thread Reinis Rozitis
location / { rewrite^/(.*)/(.*)$ /$1/index.php?url=$2; } I would suggest to use try_files: location / { try_files $uri $uri/ /index.php?url=$uri&$args; } Personally instead of pasing the uri in the 'url' param I like to use try_files $uri $uri/ /index.php?$args; a

Optimize rewrite

2013-04-03 Thread Anto
hello I have a script that works with apache but I want to migrate to nginx, I have this rule, but maybe you can do differently optimized. ## HTACCESS RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^(.*)$ index.php?url=$1 [QSA,NC,L]