这是我创建的nginx.conf,
location / {
try_files $uri $uri/ /index.php?q=$request_uri&$args;
rewrite ^thumb/([^/]+)x([^/]+)/(.*) timthumb.php?src=http://$3&h=$2&w=$1 last;
}
然而,我得到错误404 nginx,我必须做什么?感谢
答案 0 :(得分:0)
location ~* \.(js|css|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|wml|swf|pdf|doc|docx|ppt|pptx|zip)$ {
expires max;
log_not_found off;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location / {
rewrite ^/thumb/([0-9]+)x([0-9]+)_(.*) /timthumb.php?src=http://$3&h=$2&w=$1 last;
try_files $uri $uri/ /index.php?q=$request_uri&$args;
}