ethyreal Mobile Developer

Tomcat and Mod_Rewrite Query Strings

Aug 19 2009 - By George Webster

I learned a lesson in why you should read the documentation today. After setting up rewrite rules for mod_rewrite and running into 404 errors from tomcat i was left scratching my head, then it dawned on my that the rewrites were not being passed to tomcat.

I read in various google searches about module loading order and preference with mod_rewrite and mod_jk and none of those trains of thought seemed to click.

Then I found the query string modifier flags in the documentation!

Adding simple "Last" and "Pass Through" flags in my rewrite rules send the last modification through to tomcat as a query string!!!



	ServerName mydomain.com
	ServerAlias www.mydomain.com

	RewriteEngine on
	RewriteRule ^/someDirectoryName/(.*)$ /somescript.cfm?somevar=$1 [L,PT]	

	JKMount /* worker1
 

Recent Posts

Categories

© 2012 ethyreal.com