Home > Questions and Answers > General Questions

How To Hide Server Folders from Being Displayed (6)


03-24-2017 09:05 PM #1 kelvonroy (AMC Alumnus)
How To Hide Server Folders from Being Displayed

Hello there,

When I hosting landers, let's say 3 landers on:
http://www.website.com/mobile/lp1/index.html
http://www.website.com/mobile/lp2/index.html
http://www.website.com/mobile/lp3/index.html

When someone accesses http://www.website.com/mobile/ , they get to see all the folders hosted there, is there a way to hide it from being displayed?

Thanks


03-24-2017 09:43 PM #2 matuloo (Legendary Moderator)

Put an index.html or index.php file into the ../mobile/ directory, browsers will load that file instead of the directory structure. I think there is also a way to prohibit directory listing, ask your host to do it for you.


03-25-2017 06:54 AM #3 kelvonroy (AMC Alumnus)

You are the man. Thanks Matuloo.


03-25-2017 09:27 AM #4 manamanamedia (Member)

If you have access to your server vhost (should be httpd.conf) config file, you could add something like:

<Directory /www/somefolder>
Options -Indexes
</Directory>


03-25-2017 10:31 AM #5 erikgyepes (Moderator)

Additionally to Matej's tip you may add 404 not found kind error into the file, so it will look like nothing is there..


03-25-2017 11:58 AM #6 osmiumman (Member)

Just create / edit the file .htaccess in the root folder and add

Options -Indexes


Home > Questions and Answers > General Questions