Discuz論壇 初步靜態化教學

  1. create .htaccess in the root directory of Discuz
  2. RewriteEngine on
    RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
    RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
    RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
    RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
    RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
  3. 到論壇後台全局→優化設置→URL 靜態化:、Rewrite 兼容性 開啟。
  4. 更新緩存。然後我們可以到論壇隨意點一個頁面進入看網址是否已變成靜態化(等個1~3秒才會變化)

Reference:
http://bbs.goodideaa.com/thread-2522-1-1.html

Leave a Reply

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu