<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## URL設計 `6.0`的URL訪問受路由影響,如果在沒有定義或匹配路由的情況下(并且沒有開啟強制路由模式的話),則是基于: ``` http://serverName/index.php(或者其它入口文件)/控制器/操作/參數/值… ``` 如果使用自動多應用模式的話,URL一般是 ``` http://serverName/index.php/應用/控制器/操作/參數/值... ``` >[danger] 普通模式的URL訪問不再支持,但參數可以支持普通方式傳值 如果不支持PATHINFO的服務器可以使用兼容模式訪問如下: ``` http://serverName/index.php?s=/控制器/操作/[參數名/參數值...] ``` ## URL重寫 可以通過URL重寫隱藏應用的入口文件`index.php`(也可以是其它的入口文件,但URL重寫通常只能設置一個入口文件),下面是相關服務器的配置參考: ### \[ Apache \] 1. `httpd.conf`配置文件中加載了`mod_rewrite.so`模塊 2. `AllowOverride None` 將`None`改為 `All` 3. 把下面的內容保存為`.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] </IfModule> ~~~ ### \[ IIS \] 如果你的服務器環境支持`ISAPI_Rewrite`的話,可以配置`httpd.ini`文件,添加下面的內容: ~~~ RewriteRule (.*)$ /index\.php\?s=$1 [I] ~~~ 在IIS的高版本下面可以配置`web.Config`,在中間添加`rewrite`節點: ~~~ <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> ~~~ ### \[ Nginx \] 在Nginx低版本中,是不支持PATHINFO的,但是可以通過在`Nginx.conf`中配置轉發規則實現: ~~~ location / { // …..省略部分代碼 if (!-f $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } } ~~~ > 其實內部是轉發到了ThinkPHP提供的兼容URL,利用這種方式,可以解決其他不支持PATHINFO的WEB服務器環境。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看