Search code examples
javastruts

How to keep URL same for all request


I am working on a website, where I am using Java/Java EE/struts.

When I request any page it shows me session id and all other stuff in URL. Will some one please help me how to get rid of. I am reading about URL rewriting. But I am not getting how to implement it. Ex.

http://mywebsite.com/welcome.do;jsessionid=6E79E050360BAC1858CA7AC7974D75C7

I want it to be http://mywebsite.com/ only.

This is useful for SEO also.


Solution

  • I suggest you set the canonical URL instead if you are worried about SEO.

    http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html