views:

159

answers:

0

We've created a jkMount in Tomcat named "shopping" and then applied this rewrite rules on Apache:

# when Query String
RewriteCond %{QUERY_STRING} !^$
RewriteRule ^pt/?([a-zA-Z0-9\./_-]+)? $1?idLang=1&%{QUERY_STRING} [NC,PT,L]    
RewriteRule ^en/?([a-zA-Z0-9\./_-]+)? $1?idLang=2&%{QUERY_STRING} [NC,PT,L]    
RewriteRule ^es/?([a-zA-Z0-9\./_-]+)? $1?idLang=3&%{QUERY_STRING} [NC,PT,L]    
RewriteRule ^nl/?([a-zA-Z0-9\./_-]+)? $1?idLang=4&%{QUERY_STRING} [NC,PT,L]    
RewriteRule ^br/?([a-zA-Z0-9\./_-]+)? $1?idLang=11&%{QUERY_STRING} [NC,PT,L]

# when not having Query String
RewriteRule ^(pt|en|br|nl|es)/(images|css|js|swf)/?([a-zA-Z0-9\./_-]+)? $2/$3 [NC,PT,L]
RewriteRule ^pt/?([a-zA-Z0-9\./_-]+)? $1?idLang=1 [NC,PT,L]    
RewriteRule ^en/?([a-zA-Z0-9\./_-]+)? $1?idLang=2 [NC,PT,L]
RewriteRule ^es/?([a-zA-Z0-9\./_-]+)? $1?idLang=3 [NC,PT,L]
RewriteRule ^nl/?([a-zA-Z0-9\./_-]+)? $1?idLang=4 [NC,PT,L]    
RewriteRule ^br/?([a-zA-Z0-9\./_-]+)? $1?idLang=11 [NC,PT,L]

This Works

http://www.DUMMY.com/en/shopping/ rule for http://www.DUMMY.com/website/shopping/?id=1

But when I add a sub folder doesn't

http://www.DUMMY.com/en/shopping/cart/ rule for http://www.DUMMY.com/website/shopping/cart/?id=1

http://www.DUMMY.com/en/shopping/user/ rule for http://www.DUMMY.com/website/shopping/user/?id=1

http://www.DUMMY.com/en/shopping/payment/ rule for http://www.DUMMY.com/website/shopping/payment/?id=1

Or when I call for home that don't have defined any jkMount http://www.DUMMY.com/en/home/ rule for http://www.DUMMY.com/website/home/?id=1

It gives a 404 http response.

For "home" I have to define another jkMount in Tomcat? And for subfolders those rewrite rules shouldn't work?

Anyone can help me please?

Thanks in advance.