简体   繁体   中英

why would redirecting 404 errors cause a js file to return HTML?

I was suspicious that the issue of seeing console errors "showing HTML as JS files" was caused by my attempt to redirect 404 errors. And then a comment on this reddit post suggested that this was a valid assumption... But how is this possible? By what means does a JS resource become HTML when 404s are redirected?

此重定向问题

Application servers usually have default web pages to render HTTP error codes. For instance, these are the Apache 2.4 settings regarding custom error responses.

So, it's normal to get HTML responses for HTTP error codes if your application server is configured as such.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM