How to allow accessing only the main page by the url

Asked

Viewed 159 times

0

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

1 answer

0

Create a file . htaccess (no name, only with this extension).

Open in the notepad, and type:

Directoryindex index.php

Options Indexes

Browser other questions tagged

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