Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要有关动态搜索页面的帮助。我需要改变:
/download.php?q=search
到
/download.php?mp3=search
所以只有搜索页面需要把q改成mp3。如果有人可以提供帮助,我将不胜感激。我想通过 .htaccess 做到这一点
提前致谢
类似的东西:
RewriteRule ^/download.php?q=(.*) /download.php?mp3=$1 [L]
查询字符串只能作为 RewriteCond 的变量使用。像这样的东西应该工作:
RewriteCond %{QUERY_STRING} q=([^&]*) RewriteRule ^download.php download.php?mp3=%1 [L,QSA,NC]