Need some help with rewrite rule translation

mailinglisten at simonhoenscheid.de mailinglisten at simonhoenscheid.de
Thu Jun 13 08:38:59 UTC 2013


That is what I have got:
Am 13.06.2013 05:46, schrieb wishmaster:
> --- Original message ---
> From: "Simon H�nscheid" <mailinglisten at simonhoenscheid.de>
> Date: 13 June 2013, 01:14:11
> 
> 
> Hello List,
> 
> I managed to translate nearly all our old apache rules, but have some
> problems with the following ones:
> 
> # skip existing files
> RewriteCond %{REQUEST_FILENAME} -f [OR]
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule .* - [L]

I have no solution here

> RewriteRule ^favicon\.ico$ - [R=404,L]

location /(^favicon)/(.*\.(ico)) {
return 404;
}
> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^([0-9]+)\.(flv|gif)$ getFile.php?itemid=$1&type=$2 [L]
> 
location / {
if (!-e $request_filename){
rewrite ^/([0-9]+)\.(flv|gif)$ /getFile.php?itemid=$1&type=$2 last;
}
}


> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_URI} !\/upload\/
> RewriteRule ^(.*)$ upload/$1 [L]

location ~ \/upload\/ {
}

location / {
if (!-e $request_filename){
rewrite ^(.*)$ /upload/$1 last;
}
}

> And what is your own (draft) rules after reading
> http://nginx.org/en/docs/http/converting_rewrite_rules.html ??
> 
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list