Railo on Apache / Tomcat - Windows (Part 3) - Getting URL Rewriting works for ColdBox

Well I thought this was going to be an easy process, but it turned out to be little bit trickier than I thought.

Apparently there are a couple of ways to get ColdBox SES (Search Engine ) URL to work.

From what I gather from this ColdBox Forum Post, you can use one of the following:

1. Tuckey URL Rewrite

2. Using AJP Proxy combined with Apache mod_rewrite

3. Using mod_jk

I haven’t tried the Tuckey solution, but I’ve tried the mod_rewrite and mod_jk. I can’t exactly remember why I didn’t go with the AJP/mod_rewrite solution, I’ve got a feeling it’s because mod_jk solution seems to be the one with the least tinkering with Apache and do all the necessary grunt work on Tomcat. If you want to give it a go - Sean Corfield wrote a good guide on it: Railo_for_Dummies_Part_IV_Appendix

For going down the mod_jk path - I have found the following blog post useful : Railo–Apache–Tomcat–Mura-CMS-SES-URL-Gotcha

I have added the following to my Apache virtual host file

<VirtualHost *:80>
JKMount /* worker1
ServerName tomcat.ra.turboColdBox
</VirtualHost>

As well as adding the following on Tomcat web.xml file

<servlet-mapping>
   <servlet-name>RailoCFMLServlet</servlet-name>
   <url-pattern>/index.cfm/*</url-pattern>
</servlet-mapping>