.htaccess - Java app loads single url only after deployed -
i have tested java app in local developed using jsp , servlets.
i have domain , copy war in domain. able access app http://mdomain.com:8080/myapp without issues.
now, want make app available while hitting http://mdomain.com. so, configured .htaccess file domain follows,
rewriteengine on rewritecond %{http_host} ^mydomain.com rewriterule ^(.*)$ http://mdomain.com:8080/myapp/ [p]
now, able see home page when hittng http://mdomain.com.
while hitting submit button, page loading home page , no respective pages displayed.
i using apache tomcat7. put war in webapps.
what missing here?
may copy myapp folder public_html folder.
if mod_proxy
enabled can use:
rewriteengine on rewritecond %{http_host} ^mydomain\.com$ [nc] rewriterule ^(.*)$ http://mdomain.com:8080/myapp/$1 [p]
note use of $1
back-reference of captured value in rewriterule
Comments
Post a Comment