Bernard
Bernard

Reputation: 4580

How to run a php or html file in default inside a folder?

This might be a very basic question. I have a folder in my website and inside that there is couple of php and html files which are connected to each other. This is the path:

http://107.170.253.5/login

First question is I don't want the user see this path. And second question is I want the user when click on above link. It goes directly into the login.html. Any help or reference will be appreciated.

Upvotes: 0

Views: 542

Answers (1)

CS GO
CS GO

Reputation: 912

make a .htacess file and add these

//only for login dir so that no one sees any file inside it.

<Directory your_full_dir_name/login/>
Options -Indexes
</Directory>

//for whole website so that no one sees any file inside it.

<Directory root_dir_name>
Options -Indexes
</Directory>

//to make login.html default page

DirectoryIndex login.html

Upvotes: 1

Related Questions