在我開(kāi)時(shí)打開(kāi)模式不一樣:
apache的.htaccess配置文件是以:RewriteEngine On 將寫(xiě)模式打開(kāi)。
Apache偽靜態(tài)html(URL Rewrite)設(shè)置法
phpma一 打開(kāi) Apache 的配置文件 httpd.conf 。
phpma二 將#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
phpma三 在 httpd.conf中添加:
復(fù)制代碼 代碼如下:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{ENV:SCRIPT_URL} (?:index|dispbbs)[-0-9]+.html
RewriteRule ^(.*?(?:index|dispbbs))-([-0-9]+).html$ $1.php?
__is_apache_rewrite=1&__rewrite_arg=$2
</IfModule>
復(fù)制代碼 代碼如下:
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/archiver/([a-z0-9-]+.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+?).html$ $1/viewpro.php?$2=$3
復(fù)制代碼 代碼如下:
RewriteRule ^(.*)/category(d+).html$ $1/index.php?catid=$2
復(fù)制代碼 代碼如下:
RewriteRule ^category(d+).html$ index.php?catid=$1 [QSA,L]
新聞熱點(diǎn)
疑難解答
圖片精選