0

I have two files on my root directory named 'index.html' and 'index.php'. when I browse 'localhost/dir_name' it loads 'index.html'. why 'index.php' is not loaded on the browser..??

Biswajit Panday
  • 817
  • 10
  • 20
  • 1
    Check this out: http://stackoverflow.com/questions/16192049/how-to-make-apache-serve-index-php-instead-of-index-html – MaK Sep 29 '15 at 07:24
  • `index.html` is the default `DirectoryIndex`. Read more [here](http://httpd.apache.org/docs/2.4/mod/mod_dir.html). – user2959229 Sep 29 '15 at 07:24

1 Answers1

0

if you want to load index.php you will need .httaccess at root code for that should be

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>