如何表示问号“?”在 Apache mod_jk JkMount 中?
我有一个关于 Apache mod_jk 的问题。
我正在编写一个 JkMount 句子,它将包含问号的 URL 重定向到工作人员。
语法类似于:
JkMount /jmx-console/?配置 工人贸易服务配置
似乎需要转义。我不知道如何用 mod_jk 语法表示它。
我试过:
JkMount /jmx-console/\?配置 我的工人
JkMount /jmx-console/\?配置 我的工人
JkMount /jmx-console/*配置 我的工人
他们都不起作用。
谁能告诉我如何解决这个问题?
非常感谢。
I have a question regarding mod_jk of Apache.
I am writing a JkMount sentence which redirect a URL that contains a question mark to a worker.
The syntax is something like:
JkMount /jmx-console/?configuration
worker-tradeservice-configuration
However, the question mark seems need to be escaped. I don't know how to represent it in the mod_jk syntax.
I tried:
JkMount /jmx-console/\?configuration
myworkerJkMount /jmx-console/\?configuration
myworkerJkMount /jmx-console/*configuration
myworker
And all of them don't work.
Can anyone tell me how to solve this?
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是行不通的。
?
之后的 URL 部分不是路径的一部分,它是查询字符串,而路径组件是JkMount
尝试匹配的内容。我的建议是,您将
JkMount
与 mod-rewrite 结合起来,使用后者重写请求以将查询字符串转换为路径,然后相应地JkMount
这些路径。然而,模组重写是一个复杂的野兽,所以你需要阅读它。This isn't going to work. The part of the URL after the
?
is not part of the path, it's the query string, and the path component is whatJkMount
tries to match against.My suggestion is that you combine
JkMount
with mod-rewrite, using the latter to rewrite the requests to convert query strings into paths, and thenJkMount
those paths accordingly. Mod-rewrite is a complex beast, though, so you'll need to read up on that.