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,353
  • 12
  • 107
  • 135
Pedantic
  • 1,348
  • 10
  • 38
  • 68
  • 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.

Benjamin Udink ten Cate
  • 12,717
  • 4
  • 45
  • 67
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,049
  • 16
  • 20