I recently began converting one of my websites from .html to .php.
Originally my default page was home.html. I renamed this file home.php. When I searched for my domain, I would get the “Forbidden … 403” error message. This evening I changed the default page to index.php and for some reason I no longer get the 403 error webpage.
I think I picked up the (bad?) habit on naming the default page “home.html” when I began using RapidWeaver years ago. I now realize that it is probably best practice to use index rather than home for the default webpage title. That said, I am shocked that renaming the default page to index eliminated the error message. I think I recall reading somewhere that default webpages beginning with “index” are searched for first when opening domains on the 'net, but I could be wrong.
Does this make sense to anyone?
I was ready to begin tweaking my .htaccess file to redirect to the new default page, but that no longer seems to be necessary. I anyone can shed some light on this I would be most grateful.
Setting the above will instruct Apache to first look for a web-page named FRED.HTML. If there is no match then the other file names will be tried. If there is no match then depending on other directives an index of all the files in the folder will be displayed or an 404 error message will display stating the files could not be displayed.
BEWARE:
Upon reflection it is not as simple as just setting DirectoryIndex in the .htaccess file, there are numerous other factors which need to be taken into consideration!