user3378283
user3378283

Reputation: 307

Is it possible to route to html file via url-hash at nginx?

I want make nginx to send different html files to user depends on hash at the url. I'm trying to do this:

location /#water {
    try_files /water.html =404;
}
location /#air {
    try_files /air.html =404;
}

but it doen't work. Is it possible? How to implement it?

Upvotes: 1

Views: 178

Answers (1)

Richard Smith
Richard Smith

Reputation: 49762

The fragment, that portion of a URL after the # is not transmitted to the server, so it cannot be used with location containers.

Upvotes: 1

Related Questions