侧边栏壁纸
  • 累计撰写 100 篇文章
  • 累计创建 55 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录
PHP

ThinkPHP 伪静态

Malson
2022-07-13 / 0 评论 / 0 点赞 / 258 阅读 / 182 字

Nginx

nginx.conf

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

Apache

.htaccess

 <IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
  SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</IfModule>

IIS

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <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>
    </system.webServer>
</configuration>
0
博主关闭了所有页面的评论