I studied all the great posts to nginx proxy and rewrite functionality, but was unable to find a solution for my problem. So here we are. I wrote an web application with vaadin, that is able to handle the follwoing request:
http://<server>/#main/search?country=germany&type=songwriter
For SEO optimization, I want to handle "speaking" urls, like: http:///songwriter/germany. So I thought URL rewriting within the web-server is the solution. But whatever I tried, I am unable to place the hashtag within the request and to form the final solution! Here is what I tried:
location /songwriter/ {
proxy_set_header Host $host;
proxy_redirect off;
# Option 1 - hastag is encoded
rewrite ^/songwriter/(.+) /#main/suche?land=$1 break;
proxy_pass http://127.0.0.1:8080;
}
What I get in the trace is: /%23main/suche land=berlin/. Any idea?