I have a peculiar 404 problem with clean URL's for some time now - i just can't find the solution;
The problem only occurs at one host, while other D6 installs on different hosts work ok.

The closest I can get to the problem is - adding a few lines in the header of the site wide contact form and trying to save it (/admin/build/contact/settings).

During the save i get a 404, because drupal tries to open To file :: /subdir/admin/build/contact/settings
(The D6 install is in "subdir")

Somehow the URL translation goes bonkers with FORM action values - ONLY when i add a line to the header of the site wide contact form. When i change a character in the existing line, the 404 does not occur.

I don't have this problem with any other admin settings save on the same site, upto last week with the module Outbrain. When i try to save an Outbrain setting, i get the same 404. To file :: /subdir/admin/settings/outbrain

I've triple checked .htaccess, it all seems ok - even set a rewritebase because the install is in a subdir.

The same D6 version on a different host with the same modules Contact & Outbrain there's no problem at all.

What really boggles my mind is, why FORM ACTION settings would trip the clean URL translation?

Anyone?

Cheers
Nomad

Comments

nomad-drupal’s picture

Narrowed the problem down - using Firebug to see the actual POST data from the contact settings form.

This data triggers a 404 - see the 6th line in the contact form data;

contact_default_status	1
contact_form_information	<p>1<br /> 2<br /> 3<br /> 4<br /> 5 lines, ok</p> <p>6th line</p>
contact_hourly_threshold	3
form_build_id	form-2783aee9cf224c76a7eb6a27cf749333
form_id	contact_admin_settings
form_token	818ebd3212343257e9924aa63ad3cd590d1
op	Save configuration

This saves ok, just as it should; the 6th line with <p>6thline</p> is removed

contact_default_status	1
contact_form_information	<p>1<br /> 2<br /> 3<br /> 4<br /> 5 lines, ok</p>
contact_hourly_threshold	3
form_build_id	form-60dee13a92c3e72c4eb414555042301b
form_id	contact_admin_settings
form_token	818ebd3212343257e9924aa63ad3cd590d1
op	Save configuration

It doesn't matter how many lines there are, once the extra <p>something</p> is there, the 404 comes.

It seems somehow the .htaccess file in the drupal directory is skipped, edits there do not change anything. The 404 keeps coming.

Baffles me!

Anyone??

nomad-drupal’s picture

The 404 turns out to be a 403 (forbidden) and is
caused by a mod security config at the server.

Had nothing to do with Drupal.

POST statements are filtered and in these
2 isolated cases the mod security filter trips a 403.

Read about it here

http://drupal.org/node/110219