tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wall <d.w...@computer.org>
Subject mod_rewrite for Tomcat 5.5
Date Thu, 28 Jul 2005 22:48:48 GMT
Can anybody recommend anything like mod_rewrite for Tomcat 5.5?  I know 
the FAQ says something about "why reinvent the wheel," but in this case, 
it's because we want to get rid of Apache just because we need one small 
feature.  I've got an application that now only needs Apache httpd for 
some mod_rewrites, especially for converting short URLs to longer ones, 
such as:

https://host.com/app/a?c=ehtU3vN9JWia6&m=borrower

gets rewritten to:

https://host.com/app/customer/SomeBigCustomer/loanApplicationToSign.jsp?c=ehtU3vN9JWia6&m=borrower

With mod_rewrite, this is something like:

RewriteRule ^/app/a(.*)$  
https://host.com/app/customer/SomeBigCustomer/loanApplicationToSign.jsp$1 
[R,L]

In practice, I don't even need the full power of mod_rewrite to rewrite 
the domain part, so it would be okay just to map

/app/a?c=ehtU3vN9JWia6&m=borrower

to

/app/customer/SomeBigCustomer/loanApplicationToSign.jsp?c=ehtU3vN9JWia6&m=borrower

and keep the "https://host.com" part the same.  I won't be redirecting 
to another server (at least not initially).

Thanks,
David

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message