[Background] >> I am using Ampps stack for PHP development. In my public folder there are two index files. One is index.html and other is index.php. After running Apache server, when I type in URL - [localhost/<my-web-project>/public/][1], I get the content of [**index.html**], where as I want Apache to pick [index.php] located in the same folder. I don't want to specify everytime [localhost/<my-web-project>/public/index.php][4].
[Problem] >> So basically, how do I configure Apache to give preference/precedence to index.php instead of index.html. I know a similar @stackoverflow post - stackoverflow-DOT-COM/questions/16191861/giving-index-html-priority-over-index-php but the solution does not apply to me and I do not have enough reputation to comment there. So I am creating a new question.
[My .htaccess file, if that helps]>>
PHP Code <IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
|