pbootcms伪静态设置教程含apache、naginx、IIS不同环境配置规则

其实pbootcms伪静态已经整理好, 在根目录就可以找到

作为使用者, 只需要根据不同的服务器环境, 使用不同格式的数据就行。 

naginx

#请复制下面伪静态配置到nginx配置文件中:
#规则适合PbootCMS V2.0+版本

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

apache

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

IIS

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

如果自己不懂配置, 建议寻找技术支持。

posted @   黄文Rex  阅读(37)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示