Mod 重写查询

问题描述 投票:0回答:0

我该怎么做,重写一个 URL。

感谢您的帮助。

来自

test.php?url=username 

test/username/

我已经在 .htaccess 文件中试过了,但没有成功。

    RewriteCond %{QUERY_STRING} ^name=(.+)$
    RewriteRule /test.php$ /test/%1 [E=FILENAME:%1]
.htaccess url-rewriting
© www.soinside.com 2019 - 2024. All rights reserved.