Php HTACCESS Don';t使用参数重定向
我得到了这行代码:Php HTACCESS Don';t使用参数重定向,php,apache,.htaccess,Php,Apache,.htaccess,我得到了这行代码: RewriteRule artistprofile.php rewrite.php?$1 [R=301,L] 但是重定向没有相应地起作用 被重定向到 我期待着 请帮忙 您没有首先捕获使用$1的查询 试试这个 您必须使用,如下所示: RewriteRule artistprofile.php rewrite.php [R=301,L,QSA] 现在,URLhttp://domain.com/artistprofile.php?displayname=bryan+黄将被重定
RewriteRule artistprofile.php rewrite.php?$1 [R=301,L]
但是重定向没有相应地起作用
被重定向到
我期待着
请帮忙 您没有首先捕获使用$1的查询 试试这个 您必须使用,如下所示:
RewriteRule artistprofile.php rewrite.php [R=301,L,QSA]
现在,URLhttp://domain.com/artistprofile.php?displayname=bryan+黄
将被重定向到http://domain.com/rewrite.php?displayname=bryan+黄
RewriteRule artistprofile.php rewrite.php [R=301,L,QSA]