You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Wall <d....@computer.org> on 2005/07/29 00:48:48 UTC

mod_rewrite for Tomcat 5.5

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