Whenever I visit any page other than the home page for a new site I'm developing on my localhost, Drupal sends a 404 HTTP response but then delivers the expected content - this is even happening when requesting in the format /node/7

While I'm not overly concerned as the content is being delivered, and this is a local development - I don't think it will look too good in a production environment.

Has anyone else experienced this, and/or is there an explanation or fix for it?

Comments

horuskol’s picture

This just got a lot more troublesome - this weird 404 header is blocking any attempts to post data...

I removed the line in the .htaccess file that directs 404 errors to the Drupal controller, and now I'm getting actual 404 error content from Apache.

For some reason, my requests are hitting a 404, then when redirected to Drupal to handle, Drupal discovers the correct alias and returns actual content instead of the 404 message - since this redirect erases POST data, this also explains where form submission is not working.

Confused? I know I am.

horuskol’s picture

Heh - whoops...

Turns out when I was making a change in the .htaccess earlier, I thought that there was a mistake in the rewriterule:

RewriteRule ^ index.php [L]

and removed the space between the ^ and index...