How can i set php index files as default and not html files?

So my question is: What do i have to do if i want to set index.php as default index page and not index.html ?

hello :slight_smile:
https://forum.infinityfree.com/discussion/comment/10813

.htaccess file inside of your htdocs folder

# start here
DirectoryIndex index.php

While @OxyDac’s htaccess could works, the default settings already prefer index.php over index.html. So you can just upload your index.php and it should be used as the default page without any further configuration.

@Admin said:
While @OxyDac’s htaccess could works, the default settings already prefer index.php over index.html. So you can just upload your index.php and it should be used as the default page without any further configuration.

Not for me because when i uploaded index.php, and opened my website, it showed some random ad website, but i fixed it with a redirect script in html

@Amenofisch said:

@Admin said:
While @OxyDac’s htaccess could works, the default settings already prefer index.php over index.html. So you can just upload your index.php and it should be used as the default page without any further configuration.

Not for me because when i uploaded index.php, and opened my website, it showed some random ad website, but i fixed it with a redirect script in html

So i think we can close this Thread