我使用的是Hiawatha webserver,需要将以下Apache URL重写规则转换为URL toolkit规则。
RewriteRule ^symphony\/api(\/(.*\/?))?$ extensions/rest_api/handler.php?url=$1&%{QUERY_STRING} [NC,L]%{QUERY_STRING}不能在海瓦萨的网址工具包中使用。
我尝试过一些方法,但我的正则表达式很差。
这是基本的Hiawatha重写格式:
Match <originalurl> Rewrite <rewrittenurl>需要重写的示例URL:
http://domain.co.uk/symphony/api/entries/photos/?auth-token=019ccc6e谢谢。
发布于 2012-05-03 00:07:52
只是猜测,试试看
Match ^symphony\/api(\/(.*\/?))?\?(.*)$ Rewrite extensions/rest_api/handler.php?url=$1&$2
Match ^symphony\/api(\/(.*\/?))?$ Rewrite extensions/rest_api/handler.php?url=$1https://stackoverflow.com/questions/10415509
复制相似问题