我的.htaccess文件目前看起來是這樣的:使用mod_rewrite模擬多個子目錄
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?page=$1 [QSA,L]
它工作正常的像http://site.com/aaaaa網址,但對於像http://site.com/aaaa/bbb網址$ _GET [「頁」]變量將只包含bbb而不是aaaaa/bbb。
有沒有辦法讓頁面變量中的所有子目錄?
嘗試刪除結尾/?在RewriteRule – yoavmatchulsky 2011-03-12 12:50:28
多個問題中,搜索 – Efazati 2011-03-12 12:55:35