3

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 myworker

JkMount /jmx-console/\?configuration myworker

JkMount /jmx-console/*configuration myworker

And all of them don't work.

Can anyone tell me how to solve this?

Many thanks.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Kevin
  • 5,972
  • 17
  • 63
  • 87

1 Answers1

2

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 what JkMount 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 then JkMount those paths accordingly. Mod-rewrite is a complex beast, though, so you'll need to read up on that.

skaffman
  • 398,947
  • 96
  • 818
  • 769