欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

apache偽靜態(tài)與iis偽靜態(tài)規(guī)則與配置區(qū)別介紹

 更新時間:2012年12月31日 14:48:27   作者:  
本文章來總結一下關于apache偽靜態(tài)與iis偽靜態(tài)區(qū)別介紹,主要講到了一些規(guī)則的問題與配置區(qū)別,以后大家就可以直接在iis偽靜態(tài)轉換apache,反之也很簡單哦,需要了解的碰可以參考下
本文章來總結一下關于apache偽靜態(tài)與iis偽靜態(tài)區(qū)別介紹,主要講到了一些規(guī)則的問題與配置區(qū)別,以后大家就可以直接在iis偽靜態(tài)轉換apache,反之也很簡單哦。

在我開時打開模式不一樣
apache的.htaccess配置文件是以:RewriteEngine On 將寫模式打開。
Apache偽靜態(tài)html(URL Rewrite)設置法
phpma一 打開 Apache 的配置文件 httpd.conf 。
phpma二 將#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
phpma三 在 httpd.conf中添加:

復制代碼 代碼如下:

<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>

iis的httpd.ini配置文件是以:[ISAPI_Rewrite] 將寫模式打開。
打開你的httpd.ini,找到
[ISAPI_Rewrite]
復制代碼 代碼如下:

# 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

更多詳細內容請查看:http://www.dbjr.com.cn/article/29390.htm

區(qū)別
apache不需要網(wǎng)站域名,而iis需要網(wǎng)站域名,且IIS遇到需要重寫的URL有問號(?)與點(.)時,需要增加()進行轉義.

區(qū)別如下
iis:
復制代碼 代碼如下:

RewriteRule ^(.*)/category(d+).html$ $1/index.php?catid=$2

apache: 
復制代碼 代碼如下:

RewriteRule ^category(d+).html$ index.php?catid=$1 [QSA,L]

相關文章

最新評論