Welcome to Maxi-Pedia Forum. Maxi-Pedia discussion forum is a free community inviting you to express your ideas and discuss various topics with other contributors.

March 29, 2024, 12:38:57 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Most Recent Posts:
Pages: [1]
  Print  
Author
Topic: 

How to hide website folder or prevent it from indexing?

 (Read 24585 times)
pawel
Semi-Newbie
*
Posts: 42


« on: November 21, 2008, 02:15:34 pm »

I need to hide content of one folder from visitors. Now, if someone goes to the folder, he or she sees a directory index. I do not provide link to my website cause it is new, but for example if you went to

https://www.example.com/folder

then you would see something like

Parent directory...
folder1
folder2
file1
file2
file3
etc.

How can I lock this directory as hidden or page not found? I want visitors stop seeing the content.

Logged
Maxi-Pedia Forum
« on: November 21, 2008, 02:15:34 pm »

 Logged
atari
Moderator
*****
Posts: 121


« Reply #1 on: November 21, 2008, 02:27:37 pm »

Hi,

Yeah, there are many ways how you can accomplish this. In any case, find some other hosting provider, Yahoo is not very flexible if you want to do some special stuff. I go with Forpsi and Station, they are not bad.

In regards to preventing the access

A)
If you have access to your httpd.conf (server configuration) file, add the following to the <Directory> section. The IndexIgnore directive adds to the list of files to hide when listing a directory.

IndexIgnore *

This setting is global. If you want to disable listing for just some folders, then:

B)
If you can edit your .htaccess file (the one in the folder you want prevent from dir listing), insert the following:

Options -Indexes

This stops showing directory listings for URLs which map to the directory.

C)
You could also disable dir indexing completely. Find the following line in your httpd.conf and place a # in front of it.

LoadModule autoindex_module modules/mod_autoindex.so

This will disable directory listing completely for everyone and everywhere.

D)
The Allow,Deny relates to restricting access . Again, this can be either in your httpd.conf or in your .htaccess.

Here is a good page on IndexIgnore: http://www.maxi-pedia.com/IndexIgnore

See here if interested learning about Order Allow,Deny: http://www.maxi-pedia.com/Order+allow+deny



Cheers. Let us know how it goes. What is your website? Just currious.
Logged
martinsherman
Semi-Newbie
*
Posts: 12


« Reply #2 on: March 05, 2013, 01:39:22 pm »

Please add the following lines to your robots.txt file:

User-agent: *
Disallow: /

It must work!
« Last Edit: March 07, 2013, 07:19:43 pm by martinsherman » Logged
Maxi-Pedia Forum
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Page created in 0.079 seconds with 23 queries. (Pretty URLs adds 0.001s, 0q)