Tomcat: Redirect default home page to another URL

To create a redirect from default page in Tomcat edit CATALINA_HOME/webapps/ROOT/index.html:

nano /CATALINA_HOME/webapps/ROOT/index.html

Where CATALINA_HOME is your tomcat directory. Delete the content and replace with the following:


<meta http-equiv="refresh" content="0;URL=<url>">



and replace <url> with new destination.

Creative Commons License
Tomcat: Redirect default home page to another URL by Ali, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at insanelabs.com.

Tagged as:
Comments (6) Trackbacks (0)
  1. mo-cacher
    2:08 AM on October 20th, 2011
    Firefox 7.0.1 Firefox 7.0.1 Windows 7 Windows 7
    Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

    Bad Idea. Better put a liddle index.jsp to the root like this:

  2. nedStark
    3:32 AM on September 11th, 2012
    Firefox 15.0 Firefox 15.0 Ubuntu Ubuntu
    Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0

    cant we redirect according to the url? any idea?

  3. Ali
    8:52 AM on September 11th, 2012
    Firefox 15.0.1 Firefox 15.0.1 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1

    You put your url in .

  4. gamerkore
    5:21 PM on May 14th, 2013
    Google Chrome 26.0.1410.64 Google Chrome 26.0.1410.64 Windows XP Windows XP
    Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31

    Works nice :D, I just needed to put URL=../myApp to redirect

    Funciona bien, solo tuve que poner URL=../myApp para que direccione a mi aplicacion web

  5. OB
    2:28 PM on February 15th, 2014
    Google Chrome 32.0.1700.107 Google Chrome 32.0.1700.107 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36

    How do you get this to work on a Windows 2012 server? I’ve tried but it just gives me a blank page! On a Windows 2008 server this works without issues.

  6. Ali
    10:32 PM on July 25th, 2014
    Wordpress App 4.1.3 Wordpress App 4.1.3 iPhone iOS 7.1.2 iPhone iOS 7.1.2
    wp-iphone/4.1.3 (iPhone OS 7.1.2, iPhone) Mobile

    No I only tried this on Linux.

Leave a comment


No trackbacks yet.