I'm trying to create the following rewrite in nginx:
https://my-domain/app/kibana#/discover?<some-get-params>
to
https://new-domain/app/discover#/?<some-get-params>
I'm struggling I think because of the "#" character. I am able to redirect to the destination, but always without the params.
My last attempt was as follows:
location / {
rewrite ^/app/kibana#/discover(.*)$ https://my-new-domain.com/app/discover#/$1 redirect;
}
What happens with this one is a 404.
If instead I do something like:
location / {
rewrite ^/app/kibana(.*)$ https://my-new-domain.com/app/discover#/$args redirect;
}
I get redirected to the right destination but without any args: https://my-new-domain.com/app/discover#/ Same thing if instead of $args I use $1 instead