Satyajit Routray
Satyajit Routray

Reputation: 1

How to hide the root page from public

I have a php website and i have pages like

xyz.com/cat/page1.html xxyz.com/cat/page2.html

Now I want to restrict this page xyz.com/cat/ from the visitors. How do I achieve this using .htaccess?

Upvotes: 0

Views: 249

Answers (1)

Perry Maholland
Perry Maholland

Reputation: 9

If you hide the root directory, then no one will be able to access anything in that folder including images and other media. Yes create an .htaccess file inside the directory you wish to deny access to. Enter the following:

order allow,deny

allow from 127.0.0.1

deny from all

Upvotes: 1

Related Questions