Forum Moderators: phranque
I have setup mod_jk so that it sent the requests to a particular folder from apache to tomcat(it is working fine). Following is what I have setup in my httpdconfig file;
# Mod_jk settings
#JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"
JkLogLevel info
JkMount /GeekMantra default
JkMount /GeekMantra/* default
# End of mod_jk settings
So whenever I type
http://localhost/GeekMantra it send request to tomcat and jsp files are parsed by tomcat. Now I am trying add rewrite rules for dynamic urls using mod_rewrite and following is what I have setup in httpdconfig file.
<VirtualHost localhost:8080>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
ServerName localhost
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log commonOptions +FollowSymLinks
RewriteEngine on
Options +FollowSymLinks
RewriteEngine on
RewriteRule GeekMantra/subsection/(.*)/(.*)/(.*)/(.*)/$ /GeekMantra/subsection?$1=$2&$3=$4 [PT]
</VirtualHost>
My Dynamic url look like this,
http://localhost/GeekMantra/subsection?section=JSP&subSection=first After rewrite it comes in this form,
http://localhost/GeekMantra/subsection/section/JSP/subSection/first/ But the rewrite is not working it is showing
HTTP Status 404 - /GeekMantra/subsection/section/JSP/subSection/first/ I really can't able to figure out why rewrite rule is not able to be implemented in this way or Am I missing some thing?.
A help in this would highly appreciated.
Thanks.
Mahavir.
In Apache 2.x, module execution order is controlled by an "internal priority scheme" and that is the only description I know of, so I can't give you nay more information than that... :(
Jim