|
鑒于X2的URL 靜態化在原有的基礎添加了一些規則,導致論壇上有人反映URL 靜態化頁面失效。
特此補充一下靜態化規則(在原有的基礎上添加,為了防止沖突,請添加到原有規則之前):
使用Apache 2.x的虛擬用戶在相應的配置文件在原有的規則下添加:- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
復制代碼 使用IIS的用戶在相應的配置文件原有的規則下添加:- RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3&$5
- RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4
- RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5
復制代碼 使用nginx的用戶在相應的配置文件原有的規則下添加:
- rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
- rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
- rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
復制代碼
其他修改見:
X2對rewrite調整后兼容X15的rewrite的辦法
http://www.discuz.net/thread-2143870-1-1.html
|
|