Nginx和Apache的rewrite写法对比
在apache httpd.conf中的写法:
RewriteEngine On
RewriteRule /index_([^/]*).html /templete1/index\.php\?itemID=$1 [L]
RewriteRule /doc_([^/]*).html /goDoc\.php\?docID=$1 [L]
在nginx.conf中的写法:
rewrite "/index_([^/]*).html" /templete1/index.php?itemID=$1 last;
rewrite "/doc_([^/]*).html" /goDoc.php?docID=$1 last;
rewrite "/aboutMe" /aboutMe.php last;
rewrite "userReg" /userReg.php last;
上一篇
Nginx的日志切割
Nginx的日志切割
下一篇
nginx的下载连接限制
nginx的下载连接限制
发表评论: