<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 以 / 結尾的路由模式 [Edit This Page](https://github.com/slimphp/Slim-Website/tree/gh-pages/docs/cookbook/route-patterns.md) Slim 處理帶有斜線結尾的 URL 和不帶斜線的 URL 的方式不同。意思就是 `/user` 和 `/user/` 不是一回事,它們可以有不同的回調。 如果你想通過重定向讓所有以 `/` 結尾的 URL 和不以 `/` 結尾的 URL 相等,你可以添加這個中間件: ``` use Psr\Http\Message\RequestInterface as Request; use Psr\Http\Message\ResponseInterface as Response; $app->add(function (Request $request, Response $response, callable $next) { $uri = $request->getUri(); $path = $uri->getPath(); if ($path != '/' && substr($path, -1) == '/') { // permanently redirect paths with a trailing slash // to their non-trailing counterpart $uri = $uri->withPath(substr($path, 0, -1)); return $response->withRedirect((string)$uri, 301); } return $next($request, $response); }); ``` 或者,也可以使用 [oscarotero/psr7-middlewares’ TrailingSlash](//github.com/oscarotero/psr7-middlewares#trailingslash) 中間件強制為所有 URL 添加結尾的斜線: ``` use Psr7Middlewares\Middleware\TrailingSlash; $app->add(new TrailingSlash(true)); // true 則添加結尾斜線 (false 移除斜線) ```
                  <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>

                              哎呀哎呀视频在线观看