phpwind伪静态规则(IIS,Nginx,Apache)的介绍及代码
phpwind iis下伪静态规则<br /><br />RewriteRule ^(.*)/(.*)-htm-(.*)-(.*)\.html$ $1/$2\.php\?$3=$4<br />RewriteRule ^(.*)/read-htm-tid-(.*)\.html$ $1/read\.php\?tid=$2<br />RewriteRule ^(.*)/thread-htm-fid-(.*)\.html$ $1/thread\.php\?fid=2<br />RewriteRule ^(.*)/simple/(+\.html)$ $1/simple/index\.php\?$2<br />phpwind apache下伪静态规则<br />RewriteEngine On<br />RewriteRule ^(.*)/thread-htm-tid-(\d+)-(.*).html $1/thread.php?fid=$2<br />RewriteRule ^(.*)/read-htm-tid-(\d+)-(.*).html $1/read.php?tid=$2<br />RewriteRule ^(.*)/commtopics-(\d+)-(.*)$ $1/thread.php?fid=$2&page=$3<br />RewriteRule ^(.*)/commtopics-(.*)$ $1/thread.php?fid=$2&page=$3<br />RewriteRule ^(.*)/article-(\d+)-(\d+)-(.*).html$ $1/read.php?tid=$2&page=$3&fpage=$4<br />RewriteRule ^(.*)/article-(\d+)-(.*).html$ $1/read.php?tid=$2&page=$3<br />RewriteRule ^(.*)/article-(.*).html$ $1/read.php?tid=$2<br />RewriteRule ^(.*)-htm-(.*)$ $1.php?$2<br />RewriteRule ^(.*)/simple/(+\.html)$ $1/simple/index.php?$2<br />phpwind nginx下伪静态规则<br />location / {<br />rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;<br />rewrite ^(.*)/simple/(+\.html)$ $1/simple/index.php?$2 last;<br />}<br />
頁:
[1]