Default PHP Sites

Hi,

I am aware that you can use a DirectoryIndex directive to ensure that the default page is "index.php" or something similar, but my situation is slightly different.

Essentially (I'm sure there must be some obvious solution), I want to be able to write code like:

<a href="define">Define Page</a>

rather than like

<a href="define.php">Define Page</a>

.

Is there no way I can have apache detect .php files as well as .html automatically?

ATM I just get

The requested URL /define was not found on this server.

What if there really is a file named 'index'? What if there's a directory named 'index'? What happens when you have both an index.php and index.html, which wins, which loses?

You can use rewrite rules to change something without an extension into .php, but I don't know a way to make it know which one you really wanted.

Apache already has settings for that, you can prioritise index files.

I could always have list like

no extension, .html, .php

or something like that. My point is, your query applies also to .html files.

If I reference a file called "file" then if that doesn't exist it will point to "file.html".