infinit redirection loop with lightbox2 module
Fragments are not sent to the server as part of a GET request.  That's why you aren't detecting them.  You could try adding a query parameter, so the request would look like this...

http://www...com/node/5/?lightbox=yes#lightbox=&lt;whatever&gt;