想要將 404 的錯誤,導到集中的某一個外部頁面。

可是Lighttpd沒有支援 external 的方式。

經由 聿彣 幫忙,找到了解決的方法。把他記下來~~

 

有二種方法,一個就是 Patch ,一個就是偷雞,用 redirect 的方式。

我是用 redirect 的方式。

編輯 lighttpd.conf

url.redirect = (
    "^/notexisting" => "http://domain.com/errs/404.html",
)

server.error-handler-404 = "/notexisting"

Done

arrow
arrow
    全站熱搜

    Ching-Wei 發表在 痞客邦 留言(0) 人氣()