By changing DirectoryIndex index.php to DirectoryIndex index.php index.html index.htm in .htaccess, we achieve to:

- Let HTML applications which use these index files work in subdirectories under Drupal
- Give users a clue about what they need to do for applications with a different index file
- Spare ourselves some frequent support questions

Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cog.rusty’s picture

Status: Active » Needs review

- And also spare ourselves from many unrelated support nightmares when users start fiddling with URL rewrites to fix their problem.

Status: Needs review » Needs work

The last submitted patch failed testing.

cog.rusty’s picture

FileSize
385 bytes

Not sure what the problem is, but here is a second try.

lilou’s picture

Status: Needs work » Needs review
c960657’s picture

I can confirm that this works as advertised. AFAICT it has no performance impact for existing pages, because index.php is always found in the root directory, so Apache doesn't look for index.html or index.htm.

c960657’s picture

Issue tags: +Quick fix

Status: Needs review » Needs work

The last submitted patch failed testing.

cog.rusty’s picture

I wonder why this patch changed from "passed" to "failed" retroactively after 3 months.

At first glance I don't see what needs to be done. I don't know what "File naming: Pass 4, Fail 1" means. Maybe I'll take a better look some day when I have more time.

c960657’s picture

Status: Needs work » Needs review
FileSize
385 bytes

The test failure is due to #368502: File naming test sometimes fails. I have uploaded the same patch again (AFAIK there is no way to make the testbot pick up a patch that has failed once).

mr.baileys’s picture

The patch seems to contain non-Unix line endings (CR+LF instead of LF). I think the guidelines were changed recently to require Unix line endings (not sure if this applies to non-PHP files though):

Line endings and directory separators

A quick note on patch syntax in your editor: please use Unix line endings (LF) and directory separators (/). Line endings can be converted manually with many text editors (there's usually a setting for this) or by piping diff output through a dos2unix utility. You will probably not need to worry about this if you're using a Mac or Linux-based PC.

cog.rusty’s picture

FileSize
374 bytes

This page makes me feel tired...

mr.baileys’s picture

FileSize
533 bytes

I tried to apply the patch to a clean D7 HEAD install, but it didn't apply cleanly (looks like a one-line offset?)... Not wanting to make cog.rusty even more tired, I re-rolled it :)

I wish I could add the second positive review, but I'm on IIS 7, which ignores the DirectoryIndex directive and only imports the URL rewriting rules. For what it's worth, I can confirm that it doesn't choke on this change though...

j.somers’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied cleanly.

Got the access denied error before the patch, correctly finds my index.html file after I applied the patch.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

I've actually totally been bitten by this before too. It never occurred to me to change the DirectoryIndex value.

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Quick fix

Automatically closed -- issue fixed for 2 weeks with no activity.