Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no-www to www question

 
Den Wightman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the server.xml in Tomcat 5.5 has:

<Host name="www.somewebsite.com">

<Alias>somewebsite.com</Alias>

...

Will the user still see the address with no-www if they go to http://somewebsite.com, or will it automatically change it to http://www.somewebsite.com?

If not, is the urlrewritefilter the best way to do that?
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you specifically set up redirect rules (for instance in Apache HTTP server) or your web app doesn't somehow redirect to "www" pages, the URL will remain whatever was entered in the client's browser address bar.
 
Den Wightman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK that's pretty much what I thought. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic