2017-06-19 17 views

回答

2

您可以在應用程序根目錄下的public文件夾中創建一個image文件夾,然後從那裏通過直接引用來訪問它們。

在404的HTML文件的一個例子。

<div class="dialog"> 
    <div> 
    <h1>The page you were looking for doesn't exist.</h1> 
    <p>You may have mistyped the address or the page may have moved.</p> 
    </div> 
    <p>If you are the application owner check the logs for more information.</p> 
    <img src="images/01.jpg" alt=""> 
</div> 

public/images/包含01.jpg圖像文件。

1

另一個想法,你可以考慮的是具有404.html500.html位於亞馬遜S3。像這樣的東西可以讓你在S3上看到你的照片和整個頁面。

然後,如果你使用的是像Heroku的一個服務託管您的應用程序,你可以改變ERROR_PAGE_URL變量指向的S3您的錯誤頁面。

相關問題