nginx How to point all pages to index.html in a directory. For example, when I visit /aa/ and /aa/aa/ /cc/
they all point to a file
ringa_lee2017-05-16 17:16:04
This has nothing to do with nginx. nginx sets a forwarding address, and then the wsgi server listening to this address can point the route you want to the file you want to go to.
ringa_lee2017-05-16 17:16:04
In the directory /path/to/html
放个文件hello.html
,
is configured as follows:
server {
listen 4080;
location / {
try_files '' /path/to/html;
}
location = /hello.html {
root /path/to/html;
}
}