国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Apache 2.4 URL ??:/server/?Server=ServerName 至 /server/ServerName
P粉038161873
P粉038161873 2024-01-16 19:21:09
0
1
604

??? /server/?Server=ServerName 重寫為 /server/ServerName,以便 ServerName ????? URL? PHP? ????? ???.

?? ? .htaccess ??? ??? ????:

????

??? /server/ServerName/server/?Server=ServerName??? ? ? 404 ??? ??????.

??? ? ??? ?????:

????

? ????? ???? ??? ?? ?? ? ??? ??? ??? ?????.

??? ?????:

  • mod_rewrite ?? ???? 404? ?????
  • .htaccess
  • ?? $1? %1? ???
  • .htaccess RewriteRule? ??? ? 404 ??? ???? ??? ??????
  • https://httpd.apache.org/docs/2.4/rewrite/remapping.html
  • ? ?? ??
  • https://cheatography.com/davechild/cheat-sheets/mod-rewrite/? ?? ??

?? ??? ??? ?????? ???? ?? ??? ????? ??? ??? ????.

?? ??? ???? ????? ????? ???? /test2/ 重寫為 /server/?Server=ServerName ???? ? ??????? ??? ????? ?? ??? ? ? ????.

????

? ??? ????? ???? ?????. URL? ?? ???? ??? ???? ?????. Apache 2.4 .htaccess ???? URL ???

RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} Server=([^&]+)
RewriteRule "^server/$" "/server/%1/?"

P粉038161873
P粉038161873

?? ??(1)
P粉182218860

??? ???? ?? ?? ? ????. ???? ?? HTML ??? /server/ServerName,因此在內(nèi)部將請求從 /server/ServerName 重寫為 /em> /server/index.php?Server=ServerName (請注意添加 index.php,如注釋中所述)。 /server/index.php?Server=ServerName? ??? ??? ???? ??(???) ?? ?????.

??? ???? ???? ? ???...

URL? ?? ???? ???. ??? ??? ???? ???? ????. "?? ??"? ??? ????? ?? ??? ??? ?? ? ????. URL? ???? ????. URL? .htaccess ?? ?? ?? ? ???? ???. HTML ???? ????? URL? ???? ???? ???.

??? ?? ??? ?? "????"? (?????) ??? ? ????. ??? ?? URL? ?????. ??? ?? ?? ?? URL? ????? ??? ??? ? ?? ?? ?? ? ?3?? ?????? ??? ?????. ??? ?? SEO? ?? ??? ?? "??"??? ?? ?? ????.

???? ?? ??? ???.

  1. HTML ?? ??? URL? ???? /server/ServerName ??? URL? ?????.
  2. (?? ??) ?? URL ??? ???? ?? ?? ??? /server/?Server=ServerName(?? /server/index.php?Server= ServerName)?? ???????. >)? /server/?Server=ServerName (或 /server/index.php?Server=ServerName) 到 /server/ServerName(?? URL)? ?????.
  3. /server/ServerName(規(guī)范 URL/您要鏈接到的 URL)重寫為 /server/index.php?Server=ServerName(?? URL/????? URL)? ??? /server/index.php?Server=ServerName(??? ???? ?? ??)? ????? ?? ?????.

?? .htaccess ????:

???

?? ??? ???? END ???? ??? ? ??? Apache 2.4? ????? ?????. ??? ?? "?? ???" ?? ?? ?? ??? ???? ? ?? ??? ?? condition? ???? ????(???? ?? ??).

? ?? ??("????")?? index.php ??? ?? ?????. %1 ????? ?? index.php 部分是可選的。 %1 反向引用包含在前面的條件中捕獲的Server URL 參數(shù)的值。 Servercondition

?? ??? Server URL ????? ?? ???? ????. ?? URL ????? ?? ?? ??? ?? (?? ???? ??? ?? ???? ??) ??? ???? ??? ? ????. ??? ??? ??????? ?? ???? ????. ??? ?? ???? ??? ??? ???? ?????? ???? ????. ??

??? ?? ???? ??? URL ? ?? ???(?: /server/ServerName//server/ServerName)? ??? ???? ?????. /code >), ??? RewriteRule /server/ServerName 而不是 /server/ServerName/),因此我刪除了 RewriteRule pattern 末尾的可選 /?pattern

?? ?? ??? /? ??? ??? ??????. ??? ?? ?? ??? ??? ?? ??? ????? ?? ??? ? ??? ??? URL? ???? ?? ?? ?? ???(???)? ????? "?? ??"? ??? ??? URL? ????? ?? ??? "????"?? ???? ???. ???? ?? URL? ?? URL???.)

Server URL 參數(shù)值中期望的值,NE (noescape) 標(biāo)志可能是也可能不是必需的。 QUERY_STRING ?? ??? ???? ???? URL???.

.htaccess 中使用 PT (passthrough) 標(biāo)志,因為這是此上下文中的默認行為。 (PTserver ?? vhost ?????? mod_rewrite? ??? ?? ??? ???? ??? ??? ????. )