テンプレートグループが見つからない場合は、不正なURLで404を表示するだけでなく、特定の404ページにリダイレクトすることが可能かどうか知っていますか?
例えば、
私が example.com/nonexistant-templategroup/に行った場合、/nonexistant-templategroup/のままではなく example.com/404/ は404テンプレートを表示します。
example.com/nonexistant-templategroup/
/nonexistant-templategroup/
example.com/404/
乾杯
あなたは次のことを行うことでそれを達成することができます:
404.group
index.html
In 404.gorup/index.html put the following conditional
404.gorup/index.html
{if segment_1 != "404" OR segment_2 != ""} {redirect="404/index"} {/if}
これにより、404が起動され、404のテンプレートが表示されると、さらに/404 の vanity 404 URLにリダイレクトされます。
/404
しかし、これにはいくつかの潜在的な欠点があります。
{exp:http_header status="404"}