0

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.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Pedantic
  • 1,368
  • 10
  • 39
  • 70
  • 2
    possible duplicate of [Is it possible to disable jsessionid in tomcat servlet?](http://stackoverflow.com/questions/962729/is-it-possible-to-disable-jsessionid-in-tomcat-servlet) – Nicole Feb 05 '12 at 02:16

2 Answers2

0

Stripping the session id is useful for security and might be for SEO. Keeping the URL identical for all requests isn't.

You want a search engine to distinguish between the different pages of your site. Also you want people/sites to be able to link to a specific page on your website.

Ben
  • 13,297
  • 4
  • 47
  • 68
0

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

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

Bruno Silva
  • 3,077
  • 18
  • 20