I am using mod_jk for my web application and apache is configured to serve every content via Tomcat other than the static css, images and js.
I want the URL without www (abc.com) to redirect to with www subdomains (www.abc.com)
I tried escaping .htaccess via mod_jk unmount statement but .htaccess doesn't seem to work in this case.
I think the basic issue is that apache is not responding to any .htaccess rule. If I can Apache make respond to .htacess the problem should be in control.
Any idea how this can be done?
Here is my .conf for the domain
JkMount /* worker1
JkUnMount /css/* worker1
JkUnMount /images/* worker1
JkUnMount /js/* worker1
JkUnMount /.htaccess worker1
Best Answer
If I understand your issue correctly, you want to turn "example.com" into "www.example.com" via a redirect. Apache httpd ought to do this for you if you use this configuration option:
Note that this is the default.
I have this configuration on my server and if I hit http://example.com/index.html (obviously an example: don't consider the previous a live link), I get a 301 (Moved Permanently) response sending me to http://www.example.com/index.html.