On Mon, 2002-12-16 at 18:51, Alexander Wallace wrote: > The line: > > RedirectMatch ^/$ http://mysite/theContext > > did the trick. > > Now I have to find out how to make apache call index.jsp automatically if no > page is requested. If i use http://localhost:8080/myapp tomcat calls > index.jsp automatically, but when going through apache > (http://localhost/myapp) apache doesn't load the index.jsp. > > How can i make it load index.jsp automatically?
You need to add the index.jsp to the possible "DirectoryIndex" directive. For example: # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.html index.jsp </IfModule> If you call a URL without a file spec, Apache will try all the files in the DirectoryIndex directive utnil it his one. Ben Ricker > Thanks again! > > On Monday 16 December 2002 15:42, Ben Ricker wrote: > > This would be done by Apache (though it could possibly be done by > > Tomcat; I use Apache). You can do it one of two ways: > > > > 1) Use mod_rewrite to rewrite "/index.html" to "/path-to-context-name". > > Not sure on the mechanics of this. Try the Apache list for pointers, or > > any number of tutotials on mod_rewrite. > > > > 2) Use the 'Redirect' directive in Apache. This is what I use and has > > worked for 2 years. Basically, you stick a line in your httpd.conf which > > goes: > > > > Redirect temp www.domain.com www.domain.com/path-to-context > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- Ben Ricker <[EMAIL PROTECTED]> Wellinx.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>