How to only allow access to the main page through the url

0

Hello, for example, in /var/www/Site I have the folder paginas and the file index.php , I would like when I access site.com the only folder that the user would have access would be the Site that would call the file index, but could not access other pages by typing site.com/paginas/teste.php .

    
asked by anonymous 12.04.2017 / 05:40

1 answer

0

Create an .htaccess file (without an actual name, only with this extension).

Open in Notepad, and type:

DirectoryIndex index.php

Options Indexes

    
11.05.2017 / 15:47