pbootcms的伪静态规则官方其实都是写好的,文件就在根目录下的rewrite目录,其中Apache环境使用.htaccess,同时在规则中有两种情况,请注意;(虚拟主机如果用apache一般都是支持.htaccess文件的,如果不支持可咨询下空间商)pbootcms的伪静态规则官方其实都是写好的,文件就在根目录下的rewrite目录,其中Apache环境使用.htaccess,同时在规则中有两种情况,请注意;(虚拟主机如果用apache一般都是支持.htaccess文件的,如果不支持可咨询下空间商) ,具体伪静态规则如下:
,具体伪静态规则如下:
<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>
如果是windows系统服务器用的IIS7+环境使用web.config,具体代码如下:
<?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>
Nginx请根据手册修改环境,将nginx.txt文件中的代码复制到伪静态中,代码如下:
#规则适合PbootCMS V2.0+版本
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?p=$1 last;
}
}
沃梦达教程
本文标题为:PbootCMS伪静态配置教程以及各web容器配置规则
基础教程推荐
猜你喜欢
- Windows下搭建个人博客(Apache+MySQL+PHP+WordPress) 2023-10-08
- php – WordPress数据库错误MySQL服务器已经离开查询 2023-10-08
- php-如何从wordpress数据库中获取数组值get_results 2023-10-08
- PBOOTCMS栏目/列表标签序号数从第N个开始的办法 2023-07-08
- WordPress搭建安装方法及步骤 2023-10-08
- 搭建WordPress博客程序库 2023-10-08
- mysql-WordPress访问 2023-10-08
- php – 如何将wordpress数据库中的缩略图转换为外部页面 2023-10-08
- dedecms织梦采集的文章发布时间变为1970-1-1的解决办法 2022-09-02
- php – WordPress Skeleton,VVV,Multisite和正确的Nginx规则 2023-10-08
