httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Paul <antonypau...@gmail.com>
Subject Re: [users@httpd] RewriteRule to Tomcat!
Date Fri, 29 Oct 2004 05:10:05 GMT
I used the following rule to forward all requests to a subdirectory.

RewriteEngine On
RewriteRule ^(.*\.jsp)$  /subdir$1 [L,nc,PT]

# if a jsessionid is appended to URL pass it to tomcat.
RewriteRule ^(/.*;jsessionid=.*)$ /subdir$1 [L,nc,PT]

# If nothing above matches it is processed here by Apache
RewriteRule ^(.*)$ /subdir$1 [L]

PT at the end for JSP says Apache to pass the request to Tomcat after
rewriting the URL.

Please look at the Apache docs for module mod_rewrite and Rewrite guide.

rgds
Antony Paul



On Tue, 26 Oct 2004 10:19:45 -0400 (EDT), Simen Fan <simen4fan@yahoo.ca> wrote:
> 
> Hi, Antony Paul,
> 
> Yes, that's what I need. But only for 'webapp' directory on
> 
> the Tomcat, not for the others. How can write the rewrite rules?
> 
> Thanks! 
> 
> 
> 
>  
> 
> Simen
> 
> 
> Simen Fan <simen4fan@yahoo.ca> wrote:
> 
> Hi,
>  
> I have Apache2 distribute tasks to Tomcat which sits on a different machine.
> Mod_ssl is set up in Apache. How can I write a rule to 
> forward https://myhost to https://myhost/webapp, which 'webapp'
> is the directory of my application on Tomcat (only for webapp directory).
> Thanks!
>  
> Simen
> 
> 
> ________________________________
> Post your free ad now! Yahoo! Canada Personals
> 
> 
> 
> 
> 
> ________________________________
> Post your free ad now! Yahoo! Canada Personals
> 
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message