Change the home page via htaccess

Asked

Viewed 453 times

2

People when accessing my site apache automatically loads the page index.php.
It is possible to change this in the htaccess?

I want him to always search the page Login.php.

2 answers

2


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

DirectoryIndex Login.php
  • perfect friend, thank you very much

  • You’re welcome @Hugoborges

1

RewriteEngine On
RewriteBase /

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.