Apache 配置偽靜態(tài)詳細步驟
更新時間:2010年02月28日 11:00:36 作者:
Apache配置偽靜態(tài)
dz論壇目錄下.htaccess文件內(nèi)容:
程序代碼
# 將 RewriteEngine 模式打開
RewriteEngine On
# 修改以下語句中的 /bbs 為你的論壇目錄地址,如果程序放在根目錄中,請將 /bbs 修改為 /
RewriteBase /bbs
# Rewrite 系統(tǒng)規(guī)則請勿修改
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
配置Apache;
1、修改Apache 的配置文件 httpd.conf 。將#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
2、在 httpd.conf中添加:
<IfModule mod_rewrite.c>
RewriteEngine On
#...
</IfModule>
3、保存httpd.conf并重啟Apache
程序代碼
復(fù)制代碼 代碼如下:
# 將 RewriteEngine 模式打開
RewriteEngine On
# 修改以下語句中的 /bbs 為你的論壇目錄地址,如果程序放在根目錄中,請將 /bbs 修改為 /
RewriteBase /bbs
# Rewrite 系統(tǒng)規(guī)則請勿修改
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
配置Apache;
1、修改Apache 的配置文件 httpd.conf 。將#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
2、在 httpd.conf中添加:
復(fù)制代碼 代碼如下:
<IfModule mod_rewrite.c>
RewriteEngine On
#...
</IfModule>
3、保存httpd.conf并重啟Apache
相關(guān)文章
Linux VPS 自動備份數(shù)據(jù)到遠程主機FTP的方法
推薦GD的免費空間,10G,并且長期穩(wěn)定。備份建議設(shè)置為每天執(zhí)行一次,時間在凌晨2點至凌晨5點之間2011-11-11
Ubuntu/Debian 自有軟件包構(gòu)建私有源詳解
這篇文章主要介紹了Ubuntu/Debian 自有軟件包構(gòu)建私有源詳解的相關(guān)資料,這里介紹詳細步驟,需要的朋友可以參考下2016-11-11
Linux系統(tǒng)設(shè)置tomcat開機自啟介紹
大家好,本篇文章主要講的是Linux系統(tǒng)設(shè)置tomcat開機自啟介紹,感興趣的同學趕快來看一看吧,對你有幫助的話記得收藏一下,方便下次瀏覽2021-12-12

