I have a tomcat application. I am also using apache server and connected it to tomcat using mod_jk. Here I used rewrite module to change my url and but when my website is running, page resources (css, js) are not loading correctly.
My tomcat application name Mahmudul
. I want to make the url www.mahmudul.com
, so I configured httpd.conf file. here is my configurtion.
<VirtualHost *:80>
ServerName www.mahmudul.com
RewriteEngine on
RewriteRule ^/(.*)$ /Mahmudul/$1 [l,PT]
JkMount /* tomcat1
</VirtualHost>
If I configured the URL to load from www.mahmudul.com/Mahmudul
, not everything works fine because then resources location is /assets/css/styles/
. But I changed the above configuration to make the URL www.mahmudul.com
. but now the location of resources /Mahmudul/assets/css/styles/
and resources are not loading. Also when clicking any links such as "contact", link shows "/Mahmudul/contact" and also session id is attached with the links. I want to omit /Mahmudul
. How can I do this?