Skip navigation.

jsp will lost its session while subdomain-rewrite applied

my system is tomcat combinded apache.I want to do SEO by apache mod rewrite so as to hard pages likewise, and devided my company's applications into several modules/subdomain( hosting in one jsp server), so as to promote each individually, such as bussines, forum, blog, news, etc.

after everything has been closely to be done, I found one unexpect result that the jsp session not only related to the application/context directory but also the hostname, so that while the audience login with one subdomain, but change to another domain(or subdomain), his session will be lost. Unless I use redirect,however, it probably will disable the SEO(sounds like to browse by hardpage link) efforts.

Seems I have been stopped just right ahead of the end-point, no evidence to show there are canals can pass to.
Except for the redirect, there is still one way to match the SEO and tradition layout at one time: user hard pages to frame it: it means the hardpages but only open to the spiders but jsp collect as usual. so far on that way, it means the rewritemodules will have to decrease its usage.

further test shows more details: no matter what domainame it change, so far as the context dir appear the session was kept, but it response empty session for the after redirect pages, for example the pure domains or the redirected-htmls, which rewrite from the jsp.

thanks
Frederick Z