getting session

please assume this situation
for the first response to the client container sent both
Set-cookie and url rewritting..when it recives the second
raquest (the client browser supports Set-Cookie header
and sent both sessionID cookie and sessionID appended to URL)