配置web.xml

<error-page>
    <error-code>404</error-code>
    <location>/index.html</location>
</error-page>

 

 

httpd.conf

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
</IfModule>

 

相关文章: