Re: .php extension
| From: | Miguel Cruz | Date: | Wed, 29 May 2002 00:27:54 +0000 |
| Subject: | Re: .php extension | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99597@lists.php.net to get a copy of this message | ||
On Tue, 28 May 2002, Luis Miguel N. Tavora wrote:
> As far as I understood it, for a server process the php
> code, the file must have the extension .php
>
> But then, the apache server (for example) requires a file
> index.html to be placed in the directory public_html/ ...
Wrong on both counts (sorry, but really it's good news for you).
1) You can have the server send any files you want through the PHP parser.
The easiest thing is to edit the line that looks like this in your
httpd.conf file:
AddType application/x-httpd-php .php
Just add extra extensions:
AddType application/x-httpd-php .php .html
2) You can have the server use and file(s) you want as the "default" when
a user requests a directory. Find the httpd.conf line that looks like
this:
DirectoryIndex index.html
And add as many other file names as you want:
DirectoryIndex index.html index.php
So you can solve your problem in either of two ways (actually there are
plenty of others but these are the most straightforward).
miguel