2
這是我的CDN和conf文件包含「少數幾行」。Nginx不返回自定義錯誤頁面,如果表達式
的情況是真的很奇怪:
在配置上,我有
error_page 403 = /e403;
error_page 404 = /e404;
和
location =/e403 {
default_type text/html;
return 403 "somehtml403";
}
location =/e404 {
default_type text/html;
return 404 "somehtml404";
}
同時我有ARGS fitler(參數被禁止,這是一個CDN):
if ($args !~ ^$){
return 404;
}
if ($request ~* (^.*\?.*$)){
return 404;
}
當我要求/cookies.txt
我有我的自定義404頁面。當我請求/cookies.txt?onemore
或/cookies.txt?
時,我有nginx的404頁面。
問題是:爲什麼?
這是親切和真棒!謝謝!! – nikitasius