1
我試圖在頁面名稱(test2)後面獲取var,但它在php中爲空。
網址:https://example.com/test2/34
的.htaccess:
Options +FollowSymlinks
RewriteEngine on
DirectoryIndex index.php
RewriteRule ^test2 index.php?page=test2&id=$1 [QSA]
PHP $ _GET vardump
array(2) { ["page"]=> string(5) "test2" ["id"]=> string(0) "" }