2013-03-18 98 views

回答

1

您可以将error_page指令添加到您的nginx location块:

nginx documentation reference

location ^~ /video/ { 
    error_page 404   /video/404.php; 
} 
0

try_files可能做你需要的东西:

try_files first_link second_link third_link etc 

基本上,它会将用户引导至可用的第一个链接。

+0

这只适用于本地文件,不适用于链接 – teslasimus 2013-03-18 19:40:43

+0

@teslasimus - 文档中的第二个示例(mongrel)转到链接。你的情况不适用吗? – 2013-03-18 19:42:18

+0

nope,我越来越nginx:[emerg]“try_files”指令不允许在这里 – teslasimus 2013-03-18 20:16:11

相关问题