PbootCMS偽靜態(tài)配置-IIS7+環(huán)境-Apache環(huán)境-Nginx環(huán)境

日期:2020年09月03日 /人氣: /來(lái)源:本站原創(chuàng )

PbootCMS程序在IIS7+環(huán)境-Apache環(huán)境-Nginx環(huán)境中偽靜態(tài)配置方法。

一、IIS7+環(huán)境

#1.X版本使用如下規則:
<?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/{R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

#2.X+版本使用如下規則:
<?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>

二、Apache環(huán)境

#1.X版本使用如下規則:
<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
 
  #如果頁(yè)面出現"No input file specified." 請注釋第一條,啟用第二條
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
  #RewriteRule ^(.*)$ index.php [E=PATH_INFO:$1,QSA,PT,L]  
 
</IfModule>

#2.X+版本使用如下規則:
<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>

三、Nginx環(huán)境


#1.X版本使用如下規則:
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php/$1 last;
     }
}

#2.X+版本使用如下規則:
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php?p=$1 last;
     }
}

作者:chuangxinkeji

上一頁(yè): win7系統電腦藍屏代碼0X000000F4的處理和預防方法   下一頁(yè): 快消品二維碼掃碼領(lǐng)紅包促銷(xiāo)方案--營(yíng)銷(xiāo)新利器一物一碼
亚洲永久在线免费视频_男子亚洲成色av网站_欧美高清久久久久久69_综合欧美亚洲色偷拍区