IXwebhosting主機 Discuz!論壇偽靜態的方法
來源:程序員人生 發布時間:2014-02-13 02:16:26 閱讀次數:4485次
今天在IXwebhosting主機上安裝Discuz論壇,開啟偽靜態后,發現并不能成功,顯示的是404錯誤頁面。原來IXwebhosting不能像支持Wordpress偽靜態一樣支持Discuz,在wordpress里,只要后臺設置永久鏈接就可以了。而Discuz不行,現在只能用.htaccess文件完成了。
我在網上找了規則,上傳到根目錄就可以使用了,下面是.htaccess偽靜態規則:
RewriteEngine On
RewriteBase /
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
來自:www.Gonten.com
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈