Operation and Maintenance - How to configure nginx jump
滿天的星座
滿天的星座 2017-06-28 09:28:51
0
2
817

Hello everyone:

May I ask nginx how to configure automatic jump, for example, when accessing /work, how to automatically jump to /work/001.

Specifically:

I have two site access addresses: /work/001 and /work/002. If I access /work directly, it is404,
I want to configure an automatic jump for the path /work through nginx,
is to access /work Automatically jump to /work/001,
If you directly access /work/001 or /work/002, you will directly access the corresponding site.

I have been searching for a long time and found that most of them are talking about rewrite, but I still don’t understand the specific usage. I hope the master can give specific configurations.

grateful!

滿天的星座
滿天的星座

reply all(2)
大家讲道理
location = /work {
    return 302 /work/001;
}
滿天的星座

301, 302 jump, simple and affordable

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!