Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to rewrite the URL by defining various patterns in the standalone.xml of my JBoss configuration.

This is how it looks like right now:

<virtual-server name="default-host" enable-welcome-root="false">
    <alias name="localhost"/>
    <alias name=""/>
    <rewrite pattern="^/$" substitution="foo$1" flags="nocase"/>
    <rewrite pattern="^bar$" substitution="foo$1" flags="nocase"/>

But neither of these work! I have a jruby application set up with torquebox on /foo, if that matters. I wouldn't mind setting the rewrites in another file, if that works better. I just don't know how.

share|improve this question
up vote 0 down vote accepted

I don't think the rewrite will be processed unless it matches a webapp.

Try deploying your application into ROOT instead of foo.

share|improve this answer
not my first preference, but I ended up doing that. thanks... – panmari Dec 14 '12 at 19:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.