1

I need to configure my Apache instance to redirect the requests from a pattern like

/#/something/here

to

/something/here

I tried with

RewriteRule /([\#])/something/here /(.)/something/here

with no success. Any thoughts?

Pindatjuh
  • 10,550
  • 1
  • 41
  • 68
victor hugo
  • 35,514
  • 12
  • 68
  • 79

1 Answers1

5

Bad news: Hashes in URLs don't get sent to the server.

The text following the hash is known as a "fragment identifier" and is only used by the browser.

RichieHindle
  • 272,464
  • 47
  • 358
  • 399
  • I thought that too but I figured out that this just happens if the URL is in a link, if you access the URL by entering it in the address bar the headers are GET /#/something/here HTTP/1.1 .... – victor hugo Sep 09 '09 at 22:25
  • 1
    I don't know what browser you're using, but that looks broken to me. I just entered the url `http://entrian.com/#/test` into Firefox 3.5.2, and Wireshark gave me a trace with the opening line: `GET / HTTP/1.1` – RichieHindle Sep 09 '09 at 22:33
  • You're right, I made my test using HttpFox add-on and it displayed the wrong headers, thanks – victor hugo Sep 10 '09 at 17:07