基本上一个服务器实例正在运行
somesite.com/production/folder/here?param=here&count=1
我想点someite.com/demo
到/production/folder/here
,当用户键入somesite.com/production/demo?param=here
这里它将工作,而不redirect到/production/folder/here
server { server_name example.com; root /path/to/root; location / { # bla bla } location /demo { alias /path/to/root/production/folder/here; } }
如果你需要在/demo
使用try_files
你需要用一个root
替换alias
,并重写,因为这里解释的bug