nginx的cofig里加上:
if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; }
阻止对文件的访问:
location ~ /.ht { deny all; }
nginx泛域名需要在编译时加上参数: --with-http_sub_module
nginx配置: server_name www.yourdomain.com *.yourdomain.com;

