0
我有以下簡單lighttpd
重寫規則:轉換的lighttpd重寫規則nginx的
$HTTP["host"] =~ "^(app\.mydomain\.com)$" {
url.rewrite-once = (
"^[^.]*$" => "controller.php/$1"
)
}
我想港口此規則nginx
和有以下幾點:
server {
listen 80;
server_name app.mydomain.com;
if ($host = 'app.mydomain.com') {
rewrite ^[^.]*$ controller.php/$1 last;
}
root /srv/www/domains/app.mydomain.com;
index index.php;
access_log /var/log/nginx/domains/app.mydomain.com/access.log;
error_log /var/log/nginx/domains/app.mydomain.com/error.log;
include /etc/nginx/excludes.conf;
include /etc/nginx/php.conf;
include /etc/nginx/expires.conf;
}
的問題是, nginx的重寫規則無法正常工作?任何想法我做錯了什麼?謝謝。