After #927652: Drupal *always* installs without clean URLs on the UI, it turns out that Drupal now *always* installs with Clean URLs enabled.
The reason is that we now have an ErrorDocument declaration in .htaccess:
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
As a consequence, all GET requests are kind of correctly served by Drupal, even if mod_rewrite is not enabled. That makes the Clean URLs test work.
The problem is that you end up with a half-broken site: you can navigate on the site, giving the illusion that it works, but you cannot successfully submit any form (because POST requests are not routed thru). You end up frustrated and hating Drupal.
Comments
Comment #1
droplet CreditAttribution: droplet commentedBecause "ErrorDocument declaration in .htaccess", so "all GET requests are kind of correctly served by Drupal, even if mod_rewrite is not enabled." ??
not true. if rewrite disabled, it never read the .htaccess file.
anyway, do test:
rewrite.so enabled:
normal install => clean url enabled
rewrite.so disabled:
normal install => clean url disabled
seems right to me.
Comment #2
bspellmeyer CreditAttribution: bspellmeyer commentedThats plain wrong. mod_rewrite has nothing to do with .htaccess being parsed or not.
In fact I can confirm that the ErrorDocument directive indeed prevents Drupal from correctly detecting whether mod_rewirte is enabled or not.
Comment #3
montesq CreditAttribution: montesq commented@Damien
I've installed D7 HEAD on my server whereas I had in my Apache configuration: AllowOverride None.
So it was impossible to use "clean url" and however all worked fine (creation of new content-type, new content...)
Is this issue still up to date?
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedAllowOverrides None
will disable all the directives in.htaccess
and as a consequence will disable both rewriting and the errordocument.The bug is that *if* the
.htaccess
is used *and* mod_rewrite is disabled, Drupal will incorrectly enable Clean URLs.Comment #5
montesq CreditAttribution: montesq commentedHi Damien,
After several installations, the variable "clean_url" (in the table of the same name) is always 0...
Here is my process:
1° on a fresh installation, I active clean url to check that my configuration is OK (.htaccess & apache's conf...)
2° In the configuration of apache, I comment the line
LoadModule rewrite_module modules/mod_rewrite.so
and restart the server -> obviously the "clean url" is now KO
3° I drop my database and reset the file settings.php to process the new (normal) installation
4° Once all the installation steps are complete, I check the table "variable" of Drupal and can see :
clean_url s:1:"0";
Can you advise?