Directory is being displayed instead of webpages

Avfreedge
edited November -1 in Support Forums

When I enter my site url I get brought to a directory page where I can click on my php files to load them. Do I need to rename my PhP files to have one as an index.php? How do I get my URL to directly link to a specific PhP page within my htdocs dir?

Thanks for the help

Comments

  • ChrisPAR
    edited November -1

    @Avfreedge said:
    When I enter my site url I get brought to a directory page where I can click on my php files to load them. Do I need to rename my PhP files to have one as an index.php? How do I get my URL to directly link to a specific PhP page within my htdocs dir?

    Thanks for the help

    Yep, you will have to rename it to index.php.

    There is also a way to do what you said, by using the following code and replacing example.php with the name of the fil you want to load.
    Create a file named .htaccess in your htdocs folder and paste this:

    #Alternate default index page DirectoryIndex example.php