標(biāo)簽作用:配置程序偽靜態(tài)后URL中將不再包含index.php,整個(gè)地址更美觀
1)安裝rewrite組件,如果使用空間一般空間商默認(rèn)已經(jīng)安裝;
2)到后臺配置參數(shù)中開啟偽靜態(tài)開關(guān)(老版本直接修改程序config/config.php文件url_type=2);
3)在站點(diǎn)目錄建立web.config文件(老版本根目錄下默認(rèn)已有,去除后綴bak即可,新版本到rewrite目錄下拷貝規(guī)則),手動建立的話規(guī)則如下:
01 02 03 04 05 06 07 08 09 10 11 | < code >< rewrite >< rules > < rule name = "reIndex" stopProcessing = "true" > < match url = "^(.*)$" ignoreCase = "true" /> < conditions logicalGrouping = "MatchAll" > < add input = "REQUEST_FILENAME" matchType = "IsDirectory" negate = "true" /> < add input = "REQUEST_FILENAME" matchType = "IsFile" negate =
|