RewriteEngine On
ReWriteRule ^([0-9]+)$ $1.php
ReWriteRule ^([a-z]+)$ $1.php
如/news    会解析为news.php

无参数
RewriteRule /index.html /index.php

一个参数
RewriteRule /bulletin_([0-9]+).html /index.php?gOo=article_list.dwt&acat=1&p=$1

二个参数
RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$  $1/article.php?id=$2  [I]

多个参数
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$  $1/article_cat.php?id=$2&page=$3&sort=$4&order=$5  [I]


寒林

www.3code.cn 专注WordPress企业主题