This can't be done, not easily at least, as it goes against at least one major standard in which #
is used for anchoring, and anything after it is not even being sent to the server.
When an agent (such as a web browser) requests a web resource from a web server, the agent sends the URI to the server, but does not send the fragment
from https://en.wikipedia.org/wiki/Fragment_identifier
Example:
λ python -m http.server &
λ curl "localhost:8000/?param1=param1#param2=param2¶m3=param3"
127.0.0.1 - - [27/Jan/2020 15:00:32] "GET /?param1=param1 HTTP/1.1" 200 -
# ^ nothing after # is seen by the server
You have to use &
to separate URL parameters.