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)文章
CentOS服務(wù)器下安裝Webmin管理系統(tǒng)的步驟
如果你想像windows圖形化管理系統(tǒng),Webmin無疑是最好的選擇。2011-03-03centos7.6批量增加修改刪除虛擬網(wǎng)卡操作介紹
大家好,本篇文章主要講的是centos7.6批量增加修改刪除虛擬網(wǎng)卡操作介紹,感興趣的同學(xué)趕快來看一看吧,對你有幫助的話記得收藏一下2021-12-12記一次linux服務(wù)器入侵應(yīng)急響應(yīng)(小結(jié))
這篇文章主要介紹了記一次linux服務(wù)器入侵應(yīng)急響應(yīng),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-08-08linux下統(tǒng)計appche站點IP訪問量的shell腳本
這篇文章主要介紹了linux下統(tǒng)計appche站點IP訪問量的幾種shell腳本以及執(zhí)行結(jié)果2014-06-06Linux中SELinux三種模式的啟動、關(guān)閉與查看方式
這篇文章主要介紹了Linux中SELinux三種模式的啟動、關(guān)閉與查看方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-02-02