How to redirect on first access another page instead of index?

Asked

Viewed 76 times

1

I think it’s easier to understand like this: When I enter my domain:

www.site.com.br

Usually goes to index.php

But I don’t want it to go to index, but to start.php

What an htacess rule would look like for this?

2 answers

2

Follow the example

DirectoryIndex inicio.php
  • Thanks for the help Rafael Augusto

  • @userJohnNotSoDoeGrey check the answer as solved.

0

If you are using Apache, open the httpd.conf file and change the Directoryindex line to:

DirectoryIndex  inicio.html index.html index.htm

This way, the default file that Apache will search for will be start.html. If this file does not exist, then it will search for a file called index.html (the default), and so on. If you do not find any files, you will list the contents of the directory if this is allowed.

Browser other questions tagged

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