The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.
223
votes
9answers
43k views
How can I properly handle 404 in ASP.NET MVC?
I am just getting started on ASP.NET MVC so bear with me. I've searched around this site and various others and have seen a few implementations of this.
EDIT: I forgot to mention I am using RC2
...
144
votes
3answers
49k views
How to redirect to a 404 in Rails?
I'd like to 'fake' a 404 page in Rails. In PHP, I would just send a header with the error code as such:
header("HTTP/1.0 404 Not Found");
How is that done with Rails?
54
votes
9answers
48k views
Easy way to test a URL for 404 in PHP?
I'm teaching myself some basic scraping and I've found that sometimes the URL's that I feed into my code return 404, which gums up all the rest of my code.
So I need a test at the top of the code to ...
19
votes
4answers
13k views
404 Http error handler in Asp.Net MVC (RC 5)
How can I Handler 404 errors without the framework throwing an Exception 500 error code?
21
votes
4answers
20k views
How can i make a catch all route to handle '404 page not found' queries for ASP.NET MVC?
Is it possible to create a final route that catches all .. and bounces the user to a 404 view in ASP.NET MVC?
NOTE: I don't want to set this up in my IIS settings.
52
votes
10answers
62k views
Sending a 404 error in PHP
if (strstr($_SERVER['REQUEST_URI'],'index.php')) {
header('HTTP/1.0 404 Not Found');
}
Why wont this work? I get a blank page.
6
votes
5answers
7k views
404 header - HTTP 1.0 or 1.1?
So why does almost every example I can find (including this question form about a year ago) say that a 404 header should be HTTP/1.0 404 Not Found when we've really been using HTTP 1.1 for over a ...
24
votes
5answers
16k views
Django staticfiles app help
I've having a little issue with Django's staticfiles app.
I have added
'django.contrib.staticfiles',
to my INSTALLED_APPS and have added
STATIC_URL = '/static/'
STATIC_ROOT = ...
37
votes
9answers
36k views
Custom ASP.NET MVC 404 Error Page
I am trying to make a custom HTTP 404 error page when someone types in a URL
that doesn't invoke a valid action or controller in ASP.NET MVC.
Instead of it displaying the generic Resource Not Found ...
30
votes
6answers
15k views
Google App Engine and 404 error
I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like
- url: (.*)/
static_files: static\1/index.html
upload: ...
10
votes
2answers
9k views
Is there a way to force apache to return 404 instead of 403?
Is there a way how I can configure the Apache web server to return a 404 (not found) error code instead of 403 (forbidden) for some specific directories which I want to disallow to be accessed?
I ...
10
votes
4answers
8k views
urlencoded Forward slash is breaking URL
About the system
I have URLs of this format in my project:-
http://project_name/browse_by_exam/type/tutor_search/keyword/class/new_search/1/search_exam/0/search_subject/0
Where keyword/class pair ...
16
votes
8answers
11k views
Best way to implement a 404 in ASP.NET
I'm trying to determine the best way to implement a 404 page in a standard ASP.NET web application. I currently catch 404 errors in the Application_Error event in the Global.asax file and redirect to ...
37
votes
7answers
25k views
ASP.NET Custom 404 Returning 200 OK Instead of 404 Not Found
After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page and told the browser that ...
15
votes
1answer
13k views
Custom 404 using Spring DispatcherServlet
I've set up web.xml as below. I also have an annotation-based controller, which takes in any URL pattern and then goes to the corresponding jsp (I've set that up in the -servlet.xml). However, If I ...