- Do you want to request a feature or report a bug?
Bug.
- What is the current behavior?
Rewrites shadow static files (i.e. serve the rewrite rule instead of the file) without the ! or force setting when rewriting to non-HTML files or to /404.html. For example:
/* /style.css 200
/* /404.html 200
/* /.netlify/functions/my-function/:splat 200
/:id /.netlify/functions/my-function?id=:id 200
- If the current behavior is a bug, please provide the steps to reproduce.
Add index.html and 404.html as static files. Set _redirects to:
Navigate to /index.html. 404.html will be displayed instead.
- What is the expected behavior?
Rewrites don't shadow unless forced. The rewrites and proxies documentation says:
By default, you can’t shadow a URL that actually exists within the site when using a splat or dynamic path segment
- Do you want to request a feature or report a bug?
Bug.
- What is the current behavior?
Rewrites shadow static files (i.e. serve the rewrite rule instead of the file) without the
!or force setting when rewriting to non-HTML files or to/404.html. For example:- If the current behavior is a bug, please provide the steps to reproduce.
Add
index.htmland404.htmlas static files. Set_redirectsto:Navigate to
/index.html.404.htmlwill be displayed instead.- What is the expected behavior?
Rewrites don't shadow unless forced. The rewrites and proxies documentation says: