亲,欢迎光临欧方源码网,本站为您提供优质的资源与服务! 按 ctrl + D 加入收藏,下次访问更方便。
当前位置:首页 > 站长学院 > PbootCMS教程 > pbootcms设置伪静态规则

pbootcms设置伪静态规则

PbootCMS教程
欧方源码 2021-10-20 1277次

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


【Nginx伪静态规则】

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


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


如需要伪静态源文件或帮助指导,请联系客服QQ:11696561

声明: 本站资源来自网络或会员自行发布,请勿用于非法及商业用途,如果侵犯了您的权益请与我们联系!
推荐模板
QQ在线咨询