1
我有一個像下面提到的網址。需要htaccess規則來區分目錄和查詢字符串
abc.com/test/abc/hello/?hello=world&foo=bar
我已經來區分目錄和查詢字符串使用單獨htaccess的
我需要的結果,如:
Array
(
[data] => test/abc/hello/
[hello] => world
[foo] => bar
)
我試過很多方法htaccess的,但不會得到結果是我想要的。我已經試過以下方法
如果我想:
RewriteRule ^([\w\-\/]+)$ index.php?data=$1
輸出:
並試圖當:
RewriteRule .* test.php [L]
輸出:
Array
(
[hello] => world
[foo] => bar
)
但建議我htaccess的規則,從中我能得到導致像
Array
(
[data] => test/abc/hello/
[hello] => world
[foo] => bar
)
任何人可以幫助我從htaccess的
謝謝兄弟! 這條規則可以幫助我,並且正常工作 –