如何将localhost:8080/hostname/重定向到hostname.com [英] how to redirect localhost:8080/hostname/ to hostname.com
问题描述
我试图托管我的网站,并且几乎已经完成了,但是当我将我的war文件部署在tomcat7服务器上时,URL是http://www.compname.com/warfilename/index.jsp,但我希望将其转换为仅www.compname.com.
当我在网址栏中输入www.compname.com时,tomcat管理器正在打开,因此我必须输入www.compname.com/warfilename/index.jsp,然后才显示我的网站.所以,请解决我的问题并告诉我该怎么办?
阿米特·库马尔
谢谢
您必须重定向默认页面,有关 ^ ].
我认为您真正描述的是 URL重写 [ ^ ].
Hi i trying to host my website and almost i have done but when i deployed my war file on tomcat7 server then url is http://www.compname.com/warfilename/index.jsp but i want to it converts in www.compname.com only.
when i typed in url bar www.compname.com then tomcat manager is opening so i have to type www.compname.com/warfilename/index.jsp then my website is displaying. So please resolve my problem and tell me what can i do?
Amit Kumar
Thanks
You have to redirect your default page, see here for helpfullness[^].
What I think you''re actually describing is URL rewriting[^].
这篇关于如何将localhost:8080/hostname/重定向到hostname.com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!