HTTP 200 status for a 404 error

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Andyman77
Regular
Posts: 92
Joined: Mon Oct 17, 2005 2:50 pm
Location: London
Contact:

HTTP 200 status for a 404 error

Post by Andyman77 »

Ok I'm getting these types of errors when I try and add them to Google site manager or Siteadviser..

It appears that the Web site andyramblings.co.uk/ is returning an HTTP 200 status response code in the header of 404 pages.

Not sure how to sort this issue out.
Would it be a Httaccess issue or something else?

TIA
Serendipity - Site, finished ;)
Mine that is ... so lots of nonsensical Stuff
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: HTTP 200 status for a 404 error

Post by garvinhicking »

Hi!

How did you enabled the "nofile.html" rerouting process? And you using mod_rewrite or Apache ErrorDocs for s9y pretty URLs?

By default s9y redirects to index.php when a page was not found (to prive plugins the ability to listen on all urls.

If no action was taken, it branches into this piece of code:

Code: Select all

    header('HTTP/1.0 404 Not found');
    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
But that obiously does not happen since you somehow redirect to nofile.html. There lies the culprit, your redirection is not done properly.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Andyman77
Regular
Posts: 92
Joined: Mon Oct 17, 2005 2:50 pm
Location: London
Contact:

Post by Andyman77 »

Hiya

I do the re-direct via the .htaccess file.


ErrorDocument 404 http://www.andyramblings.co.uk/nofile.html

In the main configuration I don't have I have URL-rewriting disabled.
I had left it like that as every time I tried to enable it, my site would go all funny and become inaccessable..

I'll disable the .htaccess 404 line and see what happens.

other than that, Great software and looking forward to Version 1 release.

Andy
Serendipity - Site, finished ;)
Mine that is ... so lots of nonsensical Stuff
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You must not put a HTTP url there. Enter this:

Code: Select all

ErrorDocument 404 /nofile.html
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Andyman77
Regular
Posts: 92
Joined: Mon Oct 17, 2005 2:50 pm
Location: London
Contact:

Post by Andyman77 »

Hiya,

many thanks for the quick reply. I have made the changes that you suggested.

I changed the setting to mod-rewrite to on from what I had before.
Now when I try and edit a static page, I don't get the edit window where it should be, but the front page of my site? Also, when I try and go to one of the static pages, they don't open, but only bounce back to front page.

Most odd indeed, I'm sure there is an obvious answer to this, but I can't see it..

Any ideas ?
Serendipity - Site, finished ;)
Mine that is ... so lots of nonsensical Stuff
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Uh, I was not talking about you changing the URL rewriting, just changing your htaccess file. :)

What does it look like now?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Andyman77
Regular
Posts: 92
Joined: Mon Oct 17, 2005 2:50 pm
Location: London
Contact:

Post by Andyman77 »

The change in .htaccess appears to work :D
I was just wondering about the mod-rewrite. I have it enabled on my Gallery site (gallery.andyramblings.co.uk) so I thought it was about time to enable it on my main site.

TIA,

Andy
Serendipity - Site, finished ;)
Mine that is ... so lots of nonsensical Stuff
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

About your staticpages, maybe you've entered invalid permalink paths/ids?

Can you give me a sample URL to see what you refer to?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Andyman77
Regular
Posts: 92
Joined: Mon Oct 17, 2005 2:50 pm
Location: London
Contact:

Post by Andyman77 »

hiya,

Thanks for replying.

here's a sample link..

http://www.andyramblings.co.uk/index.ph ... tings.html

It should bring you to a page where I have my Firefox settings (name is a give-away) :wink:

With Mod-rewrite disabled it works, with it enable, it returns me to see the 'index' page ..
From the image you will see that I don't get the correct edit box, but the index page..

Static page edit window..
Serendipity - Site, finished ;)
Mine that is ... so lots of nonsensical Stuff
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

When enabling mod_rewrite, you cannot use those "index.php?/" URLs anymore. You then need to use URLs like this:

http://www.andyramblings.co.uk/pages/Fi ... tings.html

How did you configure the staticpage's permalink?

The editor window happens because you are using a WYISWYG editor apart from the standard one it seems? You must put a .htaccess into the wysiwyg edito rplugins directory:

Code: Select all

RewriteEngine Off
for it to work (this file is delivered with recent versions of the plugins automatically for a few months though)

HTH,
Garvin[/list]
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Andyman77
Regular
Posts: 92
Joined: Mon Oct 17, 2005 2:50 pm
Location: London
Contact:

Post by Andyman77 »

Hiya :D

All working now.
I had the permalink set to /index?/....
I edited all the static pages and now all is ok..

adding the .htaccess to my fckeditor works as it should do now.
The htaccess file wasn't there by the way. I had to add it. not that it's a problem.

FYI, FCKeditor is on a new beta 2.3. This is a lot faster and easier to setup than the previous version.

Other than that, Thanks for all the help.

Kindest regards,

Andy
Serendipity - Site, finished ;)
Mine that is ... so lots of nonsensical Stuff
Post Reply