全網整合營銷服務商

電(diàn)腦(nǎo)端+手機端+微信端=數(shù)據同步管理(lǐ)

免費咨詢熱線:15252520342

pbootcms僞靜态配置教程(IIS7、Apache、Nginx)

1)安裝rewrite組件,如果使用空(kōng)間(jiān)一般空(kōng)間(jiān)商默認已經安裝;

2)到後台配置參數(shù)中開(kāi)啓僞靜态開(kāi)關;

3)在站(zhàn)點目錄建立web.config文件(可(kě)到源碼包rewrite目錄下拷貝規則),規則內(nèi)容如下:

<?xml?version="1.0"?encoding="UTF-8"?>
<configuration>
????<system.webServer>
????????<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="true"?/>
????????????????????</conditions>
????????????????????<action?type="Rewrite"?url="index.php?p={R:1}"?appendQueryString="true"?/>
????????????????</rule>
????????????</rules>
????????</rewrite>
????</system.webServer>
</configuration>

1)開(kāi)啓Apache重寫模塊,具體(tǐ)請(qǐng)百度,如果使用空(kōng)間(jiān)一般空(kōng)間(jiān)商默認已經開(kāi)啓;

2)到後台配置參數(shù)中開(kāi)啓僞靜态開(kāi)關;

3)在站(zhàn)點目錄建立.htaccess文件(可(kě)到源碼包rewrite目錄下拷貝規則),規則內(nèi)容如下:

<IfModule?mod_rewrite.c>
??Options?+FollowSymlinks
??RewriteEngine?On
??
??RewriteCond?%{REQUEST_FILENAME}?!-d
??RewriteCond?%{REQUEST_FILENAME}?!-f
??
??RewriteRule?^(.*)$?index.php?p=$1?[QSA,PT,L]
</IfModule>

1、到後台配置參數(shù)中開(kāi)啓僞靜态;

2、在nginx虛拟主機location配置中添加規則,規則如下:

location?/?{
	?if?(!-e?$request_filename){
	????	rewrite?^/index.php(.*)$?/index.php?p=$1?last;
????????????	rewrite?^(.*)$?/index.php?s=$1?last;
	?}
}

您的項目需求

*請(qǐng)認真填寫需求信息,我們會(huì)在24小(xiǎo)時(shí)內(nèi)與您取得(de)聯系。