One way is to use mod_rewrite in Apache.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /foo/index.jsp [L]
</IfModule>Not sure so sure about how to do this with Tomcat. Nicholas Irving [EMAIL PROTECTED] pc3 wrote:
Hey folks, I have a webapp at http://www.myhost.com/foo I'd like to configure a "catch-all" web application that will take all requests for any context other than foo and have them handled by a single jsp / servlet... so I can redirect them into the /foo webapp. E.g. people who request http://www.myhost.com/bar http://www.myhost.com/stink http://www.myhost.com/woohooo ... will go to a single JSP (or whatever I can use.. deployed as one webapp hopefully).. where I can read the context off the URL and direct them somewhere into my webapp...Thanks!
