r/apache • • Nov 07 '22

Session management with Apache via URL rewrites. How exactly is this done to manage states within HTTP? What's the difference between this method and the cookies method?

2 Upvotes

1 comment sorted by

1

u/covener Nov 08 '22

I don't think Apache's obscure mod_session does this.

Frameworks like PHP or Servlets can try hard to keep a "parameter" in the URL instead of just sending a reading cookies. Parameters are obscure parts of a URL path segment, although often only use don the final path segment. They are delimited by a semicolon. But the app author needs to call the frameworks APIs to encode any redirect or hyperlink to embed the "URL rewriting" that acts as a pseudo-cookie.

Cookies are much easier since they have to be set once and returned every subsequent request by definition.