Make WordPress Core

Opened 22 years ago

Closed 21 years ago

#1108 closed defect (bug) (wontfix)

Conflicting PHP file with same name as Page slug.

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

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
22 years ago

  • Patch → No

#2 @Kafkaesqui
22 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
22 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
21 years ago

  • Resolution → wontfix
  • Status new → 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.