Bug 68257 - FallbackResource causes DirectoryIndex to fail after first try
Summary: FallbackResource causes DirectoryIndex to fail after first try
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.52
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-28 16:13 UTC by Rimas Kudelis
Modified: 2023-11-28 16:13 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rimas Kudelis 2023-11-28 16:13:49 UTC
I'm running Apache 2.4.52 on Ubuntu 22.04.

Let's say I have a WordPress website and want to access `/wp-admin/`.

A configuration like this:

```
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
FallbackResource /index.php
```

works as expected: opening `/wp-admin/` launches `/wp-admin/index.php`, which exists.

However, if `DirectoryIndex` file names are rearranged and `index.php` is no longer first in the list:

```
DirectoryIndex index.html index.php index.cgi index.pl index.xhtml index.htm
FallbackResource /index.php
```

opening `/wp-admin/` disregards the existing `/wp-admin/index.php` and launches `/index.php` instead, which (in case of WordPress) causes a redirection loop in which the page keeps redirecting to itself.