Change home page via htaccess

2

When I access my website, apache automatically loads the index.php page. Is it possible to change this in htaccess ?

I want it to always look for the Login.php page.

    
asked by anonymous 20.06.2016 / 21:32

2 answers

2

Your htaccess must be root (public_html, I believe). Try this in your .htaccess:

DirectoryIndex Login.php
    
20.06.2016 / 21:35
1
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ NomeDoArquivoAqui/$1 [L]

In FileNameHere you put the name of the file you want to redirect, Login.php for example.

    
20.06.2016 / 21:40