Web Hosting Talk







View Full Version : Help with PHP Default extension


Mefod
05-14-2002, 08:00 AM
Hi there, i have installed PHP but my webserver does not recognise .php as a default filename (folders do not redirect to index.php)

At the moment im having to use META tags in index.html to refresh the page over to index.php

which file would i have to edit to set the filetype priorities so folders auto-redirect to the index.php in the DIR.

ps. i do not know much about telnet (but i use it when i need to) or command prompts, so a "user friendly explanation" would help me a lot.

thanks

jahsh
05-14-2002, 03:09 PM
if you are on a linux/unix server just edit /etc/httpd/conf/httpd.conf and search for the line that says DirectoryIndex, then add index.php to that line and then restart apache: /etc/rc.d/init.d/httpd restart
that should do it

Avail
05-14-2002, 03:21 PM
/etc/rc.d/init.d/httpd restart

You can use "restart"? Damn, I've been doing stop/start all this time... hah. Thanks ;)

Mefod
05-15-2002, 10:11 AM
how exactly would i edit this httpd.conf file?

MotleyFool
05-15-2002, 10:22 AM
"vi httpd.conf" for editing

"apachectl graceful" does a nice job of restarting

anantan
05-15-2002, 03:32 PM
Hi,

if you create .htaccess file in your public_html directory
and if you put following command it should work.




DirectoryIndex index.php index.html



I hope it should help if u have questions feel free to mail
me.

Ananhtan