URL rewriting with a hash

2019-08-02 15:47发布

问题:

So, I am new to url rewriting, and was wondering if it is possible to rewrite the url when a hash comes into play. For instance, I have the following URL:

http://testdomain.com/#/test.php

Is there a way to rewrite this to:

http://testdomain.com/index.php?url=test.php

I am not sure whether the hash effectively makes this 'invisible' on the php side. I tried to capture the request URL this way, and it does not read anything from the hash on.

回答1:

After reading more up on this, I have found it not to be possible, as the hash is not sent to the server, and is client side only.