I've built a website and some of the pages are php pages (e.g. SomePage.php). It all works fine; both the html pages and the php pages come up and work just fine. I then made a change to the main index.html file and made it so that it's an index.php file instead, and it has some php code embedded in it, not much different than any of the other php pages on my site. But when I try to go to that index.php file, as the first file to bring up for the site, it fails to bring up the page but instead pops up an Open File dialog, asking if I want to Open or Save the index.php file. It's as if the server is not recognizing index.php as being a php file that needs the normal php pre-processing on the server side. I used to get similar prpoblems with the other php pages before I had my server properly set up with Apache and php and such. But all of that is indeed properly set up. The OTHER php pages come up OK. It's just the very first, index.php page, that doesn't come up correctly. What am I doing wrong? Is there a standard way for making it bring up the first page as a php file?
If you have access to your .htaccess file add this line to the file DirectoryIndex index.php index.htm index.html The server searches for index.php, then index.htm, then index.html in that order. If not, have your host change it.
Right now I'm running this strictly locally on my own develoment machine, during the site debugging process. Where might I find that .htaccess file on my machine?
Yes you need to make it, you can make it via a regular text editor and upload via ftp. Then you can rename it .htaccess if the file dont already exist on your root folder...
You just open a text file in textpad and write the rule and save it as renaming .htaccess.your .htaccess is ready.now place it in the folder for which you want to apply the rules.