• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Forwarding non-www to www in struts.

 
Ranch Hand
Posts: 157
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a web application using Java/Struts/Tomcat7.0 deployed on Windows server.

Currently my application is serverving both www and non-www version urls. i.e. both http://mydomain.com/somepage.html and http://www.mydomain.com/somepage.html.

I just want to redirect any url without www to the same url with www. For example if the user typed http://mydomain.com/somepage.html it should redirect to http://www.mydomain.com/somepage.html

I need to achieve this without impacting SEO.

Also what do you suggest redirecting all pages to www version.. or non-www version ?

Thanks in Advance.
 
Bala Tilak
Ranch Hand
Posts: 157
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the answer here..

https://coderanch.com/t/644942/Tomcat/URL-canonicalization-tomcat

sorry for the duplicate post. Going forward will perform search on the forum before posting the question.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic