This is a discussion on Default type within the Apache Web Server forums, part of the Web Server and Related Forums category; I have apache set up to serve for a local intranet. I have an "index.html" in the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have apache set up to serve for a local intranet.
I have an "index.html" in the root folder. If I type "http://myintranet/" into browser, the index.html page comes up (note that "index.html" was NOT included in address) I have apache set up to correctly serve .php pages (php as a module). If I enter an explicit address ending ".php" the page is served fine. Is there any way to set apache so that "http://myintranet/" would cause apache to serve "index.php"? I've tried setting "DefaultType application/x-httpd-php". |
|
|||
|
edit httpd.conf like for DirectoryIndex and add index.php to the end.
DirectoryIndex index.html index.html.var index.php as it says in the httpd.conf comments - this will tell apache which doc it should serve when it receives a directory request. if you'd rather it serve the .php file than the .html file, delete the index.html file from the line, or delete it from the directory. -josh |
|
|||
|
"Joshua Nixon" <nixonjos@msu.edu> wrote in message news:bdf682$38v$1@msunews.cl.msu.edu... > edit httpd.conf like for DirectoryIndex and add index.php to the end. > > DirectoryIndex index.html index.html.var index.php > > as it says in the httpd.conf comments - this will tell apache which doc > it should serve when it receives a directory request. if you'd rather it > serve the .php file than the .html file, delete the index.html file from > the line, or delete it from the directory. > > -josh > > This seems ok but when I alter my config file to serve index.mht all I get is > Invalid Syntax Error when I try to load the index file with my browser any >ideas ? > Carl |
| Thread Tools | |
| Display Modes | |
|
|