Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
I am getting the contents of the index.html when I put in a non-existing filename.
I can't figure it out, but when I changed the filename for the ajax request, instead of it triggering the error codes it returned 200 and returned the contents of index.html, even when that is not what I put.
Andrew Shook31,709 Points
Donnie Reese, can't be 100% sure without seeing your code and knowing a few other thing, but I think your problem has to do with the way the server is handling the http requests. If the file you are requesting is in the same folder are the index.html, then the server may be falling back to the index.html when it can't find the correct file. Not sure if this will help, but If you post you code I'm sure someone here will be able to help you.
Vance Rivera18,322 Points