Welcome! Log In Create A New Profile

Advanced

Rewrite Filename

Posted by Gnetwork 
Rewrite Filename
February 21, 2015 11:17PM
Hi, i'm on it to change from Apache to Nginx, but there are a lot of issues i got with the nginx System.
In that case i need to rewrite filenames inside a url for timthumb.

My old .htacess was been

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) img.php?src=http://helmok.gnitter.de/crawler/raw_images/$1&h=100w=115&zc=1 [L]

So i tried this in several ways in nginx, always with the same result that it aint working (file not found)

location /cache/thumb {
if (!-e $request_filename){
rewrite ^(.*)$ /img.php?src=http://helmok.gnitter.de/crawler/raw_images/$request_filename&h=100w=115&zc=1 break;
}
}


I hope someone got an idea why this aint working..
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 244
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready