Questions tagged [http-status-code-404]

404 is the HTTP status code for "Not Found"

A web server will return a status code of 404 when the resource that is being requested does not exist or cannot be found.

385 questions
2
votes
1 answer

Nginx: How to set expiration for 404 responses?

My nginx server acts as a proxy for another server, which sometimes returns 404s. I want the 404 responses to be cacheable, just like 200 responses. However, I cannot use expires, because the documentation states that: expires works only for 200,…
Ruben Verborgh
  • 171
  • 1
  • 10
2
votes
1 answer

Intercepting 404 with nginx as reverse proxy for memcached + node.js

I'm using nginx as a reverse proxy to look up html content from memcached, if not present, then node.js, if not even there, node.js returns 404. What I'm trying to do is intercept and deliver a custom page for the 404 returned by node.js The problem…
dBi
  • 75
  • 2
  • 4
2
votes
1 answer

Google-Bot fell in love with my 404-page

Every day my access-log looks kind of this: 66.249.78.140 - - [21/Oct/2013:14:37:00 +0200] "GET /robots.txt HTTP/1.1" 200 112 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" 66.249.78.140 - - [21/Oct/2013:14:37:01…
32bitfloat
  • 253
  • 2
  • 3
  • 9
2
votes
2 answers

Magento subpages give 404

I just restored our Magento website on a different server running apache2 on ubuntu. The home page pulls up just fine but if I try to go to any other page, I get a 404. Permissions All files are 660 All directories are 770 All files and…
2
votes
1 answer

Why is Nginx serving `index.html` instead of a 404?

I have a site where requesting a particular JSON file and finding it missing triggers a request for a fallback JSON file. However, rather than getting a 404 for the first file, I was getting the contents of index.html, which isn't valid JSON and…
Nathan Long
  • 1,515
  • 7
  • 22
  • 38
2
votes
2 answers

Find links that return 404s

I'm building a fairly large html site which relies on a lot of links between sections that need to be correct. Is there any way I can check each link on a page and make sure that it doesn't return a 404?
Tom
  • 736
  • 2
  • 9
  • 23
2
votes
3 answers

Forward Apache 500 status to 404

Short version: We'd like Apache to catch when a 500 status is given and return something like 404 instead. Is there a way to do this? Longer version: These servers are running applications that aren't ours, and they recently failed a PCI compliance…
2
votes
1 answer

The mod_negotiation seems to be enabled, but .php files without extensions return 404

I have the following problem - after moving to a new platform PHP files aren't found unless URL contains their extension. So, if /var/www contains file problem.php, the URL http://localhost/problem.php displays correctly, but…
Septagram
  • 927
  • 1
  • 8
  • 13
2
votes
1 answer

nginx proxy_pass POST 404 errors

I have nginx proxying to an app server, with the following configuration: location /app/ { # send to app server without the /app qualifier rewrite /app/(.*)$ /$1 break; proxy_set_header Host $http_host; proxy_pass…
Scott Klarenbach
  • 559
  • 2
  • 8
  • 19
2
votes
1 answer

Nginx .zip files return 404

I have set up Nginx as a reverse proxy for Node and to serve my static files and user uploaded images. Everything is working beautifully except that I can't understand why Nginx can't find my .zip files. Here is my nginx.conf. user nginx; …
Kenley Tomlin
  • 23
  • 1
  • 3
2
votes
1 answer

PHP File Lister Sub Directory 404 Error on Lighttpd

I just installed lighttpd today and I am having issues with lighttpd always returning a 404 error on the sub directories. I am trying to install this (h5ai) and I've followed the directions to the latter. This is the line in the configuration for…
Zane
  • 123
  • 4
2
votes
1 answer

Stop showing server software version information on 404

e.g. if someone type url that dont exist it shows 404 page and on bottom Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at india.decon.itndevelopment.com Port…
John Smith
  • 175
  • 1
  • 4
2
votes
4 answers

Let IIS 7 return php files as simple html file

I have a virtual server (Windows 2008 R2) with IIS 7.5 and a xxx.php file in one of my websites. This php file contains no php-code and I don't want to install any php-module, I only want the server to return the content of the php file as if it was…
Preli
  • 123
  • 1
  • 1
  • 6
2
votes
3 answers

Nginx 404 page behavior

I have the following nginx server config: server { listen 80; server_name example.com root /server/root; index index.php; error_page 404 = /index.php; location ~ \.php$ { try_files $uri =404; proxy_pass …
Mediocre Gopher
  • 803
  • 1
  • 12
  • 24
2
votes
3 answers

Redirect user if URL contains a specific keyword with htaccess?

I need help with setting up a rule inside .htaccess that does the following: Whenever the requested URL contains keyword love then redirect the user to another URL or maybe show a 404 page. Clarifying a bit more: If someone tries to access this URL…
Johan Larsson
  • 87
  • 2
  • 12