正在加载文档...
伪静态配置
全局伪静态配置
nginx 配置
location / {
index index.php index.html;
try_files $uri $uri/ /index.php?$args;
}
apache 配置
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$args [L,QSA]
IIS配置
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite to index.php" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?{QUERY_STRING}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>