帖子菜单

2.3.2LINUX安装宝塔面板如何设置伪静态

icgk1jx4ebo0 2020-1-12

2.3.2LINUX安装宝塔面板如何设置伪静态

宝塔带有设置伪静态写入地方,但是规则需要自己写



admin

# 1楼 2020-1-13 1 条点评

如果是Nginx填入

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

如果是Apache填入

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


如果是IIS填入

<?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?s={R:1}" />
  </rule>
  </rules>
 </rewrite>
        <directoryBrowse enabled="false" />
                <security>
          <requestFiltering allowDoubleEscaping="True" />
        </security>

    </system.webServer>
    
 </configuration>

阿斯顿撒旦

r6of8jwvs3bl

# 2楼 2020-2-6 点评

设置了之后后台还是显示不支持啊

r6of8jwvs3bl

# 3楼 2020-2-6 1 条点评

admin

2020-1-13

如果是Nginx填入

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

如果是Apache填入

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


如果是IIS填入

<?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?s={R:1}" />
  </rule>
  </rules>
 </rewrite>
        <directoryBrowse enabled="false" />
                <security>
          <requestFiltering allowDoubleEscaping="True" />
        </security>

    </system.webServer>
    
 </configuration>

阿斯顿撒旦

设置了之后后台还是显示不支持啊大哥

踩 (0)
赞 (0)
查看 (6708)
登陆后才可发表内容