I\'m doing a slideshow and each slide has a url format like this: articles/1234#slide=5. I want to retrive the slide=5 part from the url in my url.
You hit on it in your question. The anchor part of the URL is not passed to the server, it is only used client side. Why not use standard get parameters:
articles/1234?slide=5
Since you are stuck with this url format, you might want to use a animated scroll of some kind which might make this less annoying, checkout the answers to this question jquery smooth scroll to an anchor?