nginx all pages point to index.html
高洛峰
高洛峰 2017-05-16 17:14:04
0
2
760

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

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
左手右手慢动作

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.

左手右手慢动作

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;
    }
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template