News for hackers. Stuff that matters.
Re:Twitter to move away from Hashbangs by joshuahedlund on Monday February 20, 2012 @05:28PM (#3614236)
can't they just do a one-line .htaccess regex replace? or is it more complicated than that?
Re:Twitter to move away from Hashbangs by simonw on Monday February 20, 2012 @05:32PM (#3614249)
Nope, because anything after the # isn't included in the HTTP GET request made to the server - so a .htaccess-level redirection won't see it. You have to execute actual JavaScript on the client to read and redirect the #! bit.
Re:Twitter to move away from Hashbangs by sirclueless on Monday February 20, 2012 @05:33PM (#3614253)
That is the fundamental problem with hashbangs: the server receives "GET / HTTP/1.1" and the client uses javascript to render the hashbang. The server has no idea a hashbang is present until after it sends javascript to run client-side.
Re:Twitter to move away from Hashbangs by tkaemming on Monday February 20, 2012 @05:31PM (#3614247)
The redirection has to be done on the client-side, because the server never receives the fragment identifier as part of the URL.