nginx子域redirect到URL

我有一个服务器运行nginx + php5-fpm与wordpress安装。 我的网站在example.com上提供,我想configurationadmin.example.com来指向我的网站贡献者example.com/wp-admin。 如何configuration我的服务器{}块来执行此操作?

我相信这样的事情应该工作:

server { server_name admin.example.com; rewrite ^(.*) http://example.com/wp-admin permanent; } 

尝试这个:

  location / { root /home/kiputih0/public_html; index index.php; try_files $uri $uri/ /index.php?q=$uri&$args; } 

在我的固定链接中,我有自定义规则:/%year%/%monthnum%/%day%/%postname%.html

而当我浏览一些文章,它将是:

/2010/11/15/beta.html

干杯…