Oh, now I see the problem.
You can't get it to work this way, because the part of the URL from # onwards is not even sent to the server. Anchors are client-side.
The client then sends a request for the rewritten URL and gets back the response.
And then the client is supposed to apply #bestand to the result that comes back.
This is the "hash versus slash" debate for RDF resource IRIs. Just for this reason, slashes win.