如何从urlredirect到html文件,而无需在nginx中下载

我需要将URLredirect到位于文件系统上的html文件。 这是我迄今为止所尝试的:

location /this/some/url { alias /path/to/the/file.html } 

当我运行这个redirect工作,但浏览器试图下载HTML文件。 相反,我期望它在浏览器中呈现html页面。

 location /this/some/url { index file.html; alias /path/to/the/; } 

请阅读别名: https : //nginx.ru/en/docs/http/ngx_http_core_module.html#alias

和索引文件: https : //nginx.ru/en/docs/http/ngx_http_index_module.html

一切都变得清晰。