Make WordPress Core

Opened 20 years ago

Closed 19 years ago

#1108 closed defect (bug) (wontfix)

Conflicting PHP file with same name as Page slug.

Reported by: kafkaesqui's profile Kafkaesqui Owned by:
Milestone: Priority: normal
Severity: trivial Version: 1.5
Component: General Keywords:
Focuses: Cc:

Description

If a php file residing in the root directory of the weblog (with wp-blog-header.php, etc.) has a filename matching that of an existing Page slug, WordPress uses that PHP file instead of the default, theme or custom template. For example, the file "about.php" loads when accessing the "about" Page.

Change History (4)

#1 @Kafkaesqui
20 years ago

  • Patch set to No

#2 @Kafkaesqui
20 years ago

After a bit more testing I see this is not just an issue with PHP files. It seems any file type will do it (tried about.txt, about.doc and about.jpg!), as long as it's using the same filename.

#3 @ryan
20 years ago

The default rewrite rules purposefully avoid eclipsing files that exist in the filesystem by checking to see if %{REQUEST_FILENAME} exists. Perhaps mod_rewrite resolves this to any file with a matching basename, regardless of extension.

#4 @markjaquith
19 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Sounds like Options +MultiViews

Solution: turn that off, or rename your files so they don't conflict!

Note: See TracTickets for help on using tickets.