I want to add a judgment to rewrite jump in Nginx, but the result keeps reporting an error:
nginx: [emerg] unknown directive "if($host" in /usr/local/nginx/conf/nginx.conf:151 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
After reading for a long time, I don't know what the error is, and finally there is a space missing after the if !
PS:
In fact, there are already examples in the code, but the format is quite messy, so I typed it manually, and that's it.
If the format of the predecessors can be very beautiful, I can see it at a glance. . . . .