初始化提交
This commit is contained in:
10
rewrite/.htaccess
Normal file
10
rewrite/.htaccess
Normal file
@@ -0,0 +1,10 @@
|
||||
<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>
|
||||
8
rewrite/nginx.txt
Normal file
8
rewrite/nginx.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
#请复制下面伪静态配置到nginx配置文件中:
|
||||
#规则适合PbootCMS V2.0+版本
|
||||
|
||||
location / {
|
||||
if (!-e $request_filename){
|
||||
rewrite ^/(.*)$ /index.php?p=$1 last;
|
||||
}
|
||||
}
|
||||
8
rewrite/readme.txt
Normal file
8
rewrite/readme.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
此目录下文件为伪静态规则,请根据自身应用环境拷贝重写规则到根目录。
|
||||
|
||||
1、Apache环境使用.htaccess,同时在规则中有两种情况,请注意;
|
||||
|
||||
2、IIS7+环境使用web.config,IIS6请自行百度;
|
||||
|
||||
3、Nginx请根据手册修改环境,也可百度“nginx 隐藏index.php”;
|
||||
17
rewrite/web.config
Normal file
17
rewrite/web.config
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user