[v2] [cache-dir] Don't change the URL for 404 pages + the offline shell (#7943)
[v2] [cache-dir] Don't change the URL for 404 pages + the offline shell (#7943)

* Check if canonical path is 404.html

* Fix problematic redirects when removing trailing slashes

gatsbyjs/gatsby,0x80/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,0x80/gatsby,ChristopherBiscardi/gatsby,0x80/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,mingaldrichgan/gatsby,mingaldrichgan/gatsby,mingaldrichgan/gatsby,gatsbyjs/gatsby