星期五, 七月 10, 2009

几个nginx rewrite规则

Laconica:

[code lang='css']location / {
root /var/www/laconica;
try_files $uri $uri/ @laconica;
}
location @laconica {
rewrite ^(.+)$ /index.php?p=$1 last;
}[/code]


chyrp
[code lang='css']location / {
root /var/www/chyrp;
try_files $uri $uri/ @chyrp;
}
location @chyrp {
rewrite ^.+$ index.php last;
}[/code]


wordpress
[code lang='css']location / {
root /var/www/wordpress;
try_files $uri $uri/ @wordpress;
}
location @wordpress {
rewrite . index.php last;
}[/code]

没有评论: