Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to return 404 for unknown page
#2
NickC Wrote:My installation is not returning a 404 for an unknown-page request. Instead, it displays a "Oops Page not found" message. I like that, but I'd also like the server to return 404 as well. Currently it is returning 200.

I tried the bug fix mentioned here ( http://code.google.com/p/get-simple-cms/...tail?r=194 ) but the server still returned a 200.

I'm using GS 2.03 plus that patch mentioned above. I use a modified .htaccess (I run other apps as well as GS on the site) but I'm not rewriting the headers as far as I can tell.

I wonder if this is doing it
Code:
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]

An example is (/fathead is non-existent):
Code:
(in browser) http://www.nickcoleman.org/fathead
(from apache log)  "GET /fathead HTTP/1.1" 200 2284 "-"

Thanks.

Could you post a link to your site?

- Matt
Reply


Messages In This Thread
How to return 404 for unknown page - by NickC - 2011-01-27, 13:54:34
How to return 404 for unknown page - by getsimplethemes - 2011-02-02, 11:25:54
How to return 404 for unknown page - by NickC - 2011-02-02, 21:28:45
How to return 404 for unknown page - by RobA - 2011-02-03, 00:32:27
How to return 404 for unknown page - by NickC - 2011-02-03, 15:50:32
How to return 404 for unknown page - by ccagle8 - 2011-02-03, 21:18:21
How to return 404 for unknown page - by RobA - 2011-02-04, 02:08:10



Users browsing this thread: 1 Guest(s)