帮助重写此网址.简单但不起作用 [英] help rewriting this url. simple but not working
本文介绍了帮助重写此网址.简单但不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
RewriteCond %{REQUEST_URI} !^/?ping.php
RewriteRule ^/\?(.*)$ ping.php?url=$1 [L]
我正在尝试匹配/?
www.mysite.com/?someurl.com
相反,它会继续加载index.html!
instead it keeps loading the index.html !
推荐答案
您无法将查询字符串与mod_rewrite匹配,但是如果您仍然希望将其传递,则可以将%{QUERY_STRING}添加到结果url中,例如
You cannot match the query string with mod_rewrite, but if you still want to pass it on, you can add %{QUERY_STRING} to the resultant url, for example
RewriteRule ^.*$ ping.php?url=%{QUERY_STRING} [L]
这篇关于帮助重写此网址.简单但不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文