How to rewrite nginx non-existing file under condition?
- by cobra91
For a mature website I only need to generate a thumbnail once, using timthumb, which places the thumbnail in /thumbs/.
try_files $uri ^thumbs/(.*)$ /thumb.php?w=290&q=90&src=../full/%1 last;
How could I fix this code?
Working apache code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/thumbs/(.*)$
RewriteRule ^(.*)$ /thumb.php?h=90&q=90&src=../full/%1 [NS,L]
Thanks in advance :)