apache伪静态规则转nginx伪静态

忧郁骑士 发布于 2014/02/23 22:50
阅读 2K+
收藏 0

下面是apache的伪静态,求nginx的伪静态

ErrorDocument 404 /404.html


Options +FollowSymlinks


RewriteEngine On


RewriteBase /


RewriteRule ^index\.html$ index\.php


RewriteCond %{QUERY_STRING} ^wd=(.*)$ 


RewriteRule ^s$ search\.php?keywords=%1 [L]


RewriteRule ^cat-([0-9]+)\.html$ category\.php\?id=$1


RewriteRule ^cat-([0-9]+)-page-([0-9]+)\.html$ category\.php\?id=$1&page=$2


RewriteRule ^cat-([0-9]+)-area-([0-9]+)\.html$ category\.php\?id=$1&area=$2


RewriteRule ^cat-([0-9]+)-area-([0-9]+)-page-([0-9]+)\.html$ category\.php\?id=$1&area=$2&page=$3


RewriteRule ^view-([0-9]+)\.html$ view\.php\?id=$1


RewriteRule ^about-([0-9]+)\.html$ about\.php\?id=$1


RewriteRule ^bianmin$|^bianmin\.html$ bianmin\.php


RewriteRule ^bianmin-([0-9]+)\.html$ bianmin\.php\?go=$1


RewriteRule ^postcom$|^postcom\.html$ postcom\.php


RewriteRule ^post$|^post\.html$ post\.php


RewriteRule ^post-([0-9]+)\.html$ post\.php\?act=post&id=$1


RewriteRule ^post-select$ post\.php\?act=select


RewriteRule ^post-select\.html$ post\.php\?act=select


RewriteRule ^post-select-([0-9]+)\.html$ post\.php\?act=select&id=$1


RewriteRule ^post-msg$ post\.php\?act=msg


RewriteRule ^post-phone$ post\.php\?act=phone


RewriteRule ^help$ help\.php\?act=list


RewriteRule ^help-list-([0-9]+)\.html$ help\.php\?act=list&typeid=$1


RewriteRule ^help-list-([0-9]+)-page-([0-9]+)\.html$ help\.php\?act=list&typeid=$1&page=$2


RewriteRule ^help-page-([0-9]+)\.html$ help\.php\?act=list&page=$1


RewriteRule ^help-view-([0-9]+)\.html$ help\.php\?act=view&id=$1


RewriteRule ^article$|^article\.html$ article\.php\?act=list


RewriteRule ^article-list-([0-9]+)-page-([0-9]+)\.html$ article\.php\?act=list&typeid=$1&page=$2


RewriteRule ^article-list-([0-9]+)\.html$ article\.php\?act=list&typeid=$1


RewriteRule ^article-page-([0-9]+)\.html$ article\.php\?act=list&page=$1


RewriteRule ^article-view-([0-9]+)\.html$ article\.php\?act=view&id=$1


RewriteRule ^com$ com\.php


RewriteRule ^com/$ com\.php


RewriteRule ^com\.html$ com\.php


RewriteRule ^login$ member\.php\?act=login


RewriteRule ^register$ member\.php\?act=register


RewriteRule ^feedback$ feedback\.php


RewriteRule ^com-list-([0-9]+)\.html$ com\.php\?act=list&catid=$1


RewriteRule ^com-page-([0-9]+)\.html$ com\.php\?page=$1


RewriteRule ^com-list-([0-9]+)-page-([0-9]+)\.html$ com\.php\?act=list&&catid=$1&page=$2


RewriteRule ^com-list-([0-9]+)-area-([0-9]+)\.html$ com\.php\?act=list&catid=$1&area=$2


RewriteRule ^com-list-([0-9]+)-area-([0-9]+)-page-([0-9]+)\.html$ com\.php\?act=list&catid=$1&area=$2&page=$3


RewriteRule ^com-area-([0-9]+)\.html$ com\.php\?act=list&area=$1


RewriteRule ^com-view-([0-9]+)\.html$ com\.php\?act=view&id=$1


RewriteRule ^member$ member\.php


加载中
0
mojie126
mojie126

把RewriteRule改成rewrite,在最后加上last;

然后基本就成了...

忧郁骑士
忧郁骑士
谢谢~~~
0
忧郁骑士
忧郁骑士

引用来自“苏生不惑”的答案

非常感谢~~~
返回顶部
顶部