Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Force Apache to pick index.php over index.html



Normal Mode | Print  

 Force Apache to pick index.php over index.html, how do I configure Apache to give preference/precedence to index.php instead of index.html (1 Replies, Read 10830 times)
phpenthu
Group: Member
Post Group: Newbie
Posts: 1
Status:
[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 
^(.*)/$ /$[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




IP: --   


Threads
 phpenthu   Force Apache to pick index.php over index.html, how do I configure Apache to give preference/precedence to index.php instead of index.html (1 Replies, Read 10830 times)
    |--  jumla40_guy   Have you tried:...   on December 1, 2016, 3:21 pm

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 30, 2024, 9:16 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.024