伪静态配置

若您是宝特用户,可在网站站点进行一键配置修改,操作步骤如下:在相应页面找到修改位置(参考下方图片),完成配置调整后点击保存即可。

一键配置界面

若您使用的是其他服务器环境,则需手动配置伪静态规则,具体如下:

  • 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?s=$1 [QSA,PT,L]
    </IfModule>
  • IIS伪静态:配置文件常命名为web.Config,具体配置如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
          <rewrite>
              <rules>
                  <rule name="OrgPage" stopProcessing="true">
                      <match url="^(.*)$" ></match>
                      <conditions logicalGrouping="MatchAll">
                          <add input="{HTTP_HOST}" pattern="^(.*)$" ></add>
                          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" ></add>
                          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" ></add>
                      </conditions>
                      <action type="Rewrite" url="index.php/{R:1}" ></action>
                  </rule>
              </rules>
          </rewrite>
      </system.webServer>
    </configuration>
目录
设置
主题设置
深色模式
字体设置
字体大小
16