httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Beard <j...@cyberxape.com>
Subject Re: combining mod_dir/mod_rewrite/mod_proxy in apache 2.0
Date Thu, 27 Jun 2002 16:45:16 GMT
I'm wandering into unknown territory since this isn't
an approach I would take but...

You could add '/' to your rewrite rules and rewrite it as
index.jsp on the Tomcat instance. You'd probably have to
make it '/' and *only* '/' in order to not make it global.

You could say *all* requests *except* for dirs containing static
are forwarded to Tomcat.

I'd stick with 1.3 and use mod_jk. :)


--Jeff


On Fri, 28 Jun 2002, Christos Karras wrote:

> Hi,
>
>  In Apache 1.3, I used mod_rewrite and mod_proxy together to
> redirect all requests which ended with ".jsp" or contained "/servlet/"
> to a Tomcat server on port 8080:
>
> RewriteEngine 	on
> RewriteRule (.*)\.jsp http://%{HTTP_HOST}:8080$1.jsp [P]
> RewriteRule (.*)/(servlet)/(.*)	http://%{HTTP_HOST}:8080$1/$2/$3 [P]
>
> Also, I had DirectoryIndex index.jsp directive to show index.jsp as the default document,
and it was redirected to Tomcat by the RewriteRule.
>
> But now, with Apache 2.0, when a URL without the index file name is requested (http://localhost/)
the RewriteRule is no longer applied, so the index.jsp is sent by Apache, but if I request
http://localhost/index.jsp, the request is redirected to Tomcat
>
> Would there be a way to tell Apache to still apply RewriteRules after having created
a URL with DirectoryIndex (like it did in version 1.3)?
>
> Or is there another way to do what I want, using only RewriteRules?
>
> Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

--
Jeff Beard | Systems Architect, Programmer, Sysadmin
Contact    | jeff at cyberxape dot com
Location   | In front of the computer, Boulder, CO, USA


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message