伪静态文件

This commit is contained in:
sugar1569 2018-11-05 10:13:44 +08:00
parent 0cb1c9b214
commit aace56e7dc
5 changed files with 32 additions and 8 deletions

8
.htaccess Normal file
View File

@ -0,0 +1,8 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

5
nginx.conf Normal file
View File

@ -0,0 +1,5 @@
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}

View File

@ -1,10 +1,8 @@
RewriteEngine
on
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
#不显示index.php
RewriteCond %{REQUEST_FILENAME}
!-d
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1
[QSA,PT,L]
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>

13
web.config Normal file
View File

@ -0,0 +1,13 @@
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>