Portal Home > Knowledgebase > Articles Database > .htaccess


.htaccess




Posted by zenaps, 08-03-2004, 07:24 AM
On one of my websites, i would like to stop people from just looking in paths of my site and leaching files. I have noticed on many sites if you type in the direct path to say a images folder you get denied access or somot like that.. Can anyone tell me how i may do this...

Posted by Plexi_Hosting, 08-03-2004, 08:04 AM
are you talking about viewing the contents of the directory via browser? If you use CPanel, you can just use its 'Index Manager' to turn off indexing for that directory. Much easier than .htaccess, where you'd have to be able to override the Options directive. Since you asked this in a reseller's forum, you might be asking for a way to do this for your clients but I don't know how you'd do it globally as a reseller. You can if you have your own server and access to the base httpd.conf file. Or you can manually place .htaccess files in their directories.

Posted by Veghost, 08-03-2004, 08:08 AM
You may just put empty index.html file in each directory.

Posted by Plexi_Hosting, 08-03-2004, 08:09 AM
Yeah that too :-) I didn't see the forest for the trees but that is the much simpler way to do it.

Posted by zenaps, 08-03-2004, 08:34 AM
thats it i just want to stop the directory listing... only want to do it to one of my personal sites.. so its index manager in cpanel i go for ya..

Posted by Plexi_Hosting, 08-03-2004, 08:42 AM
I think that would be easiest. Second would be creating an empty index.html in each directory as suggested by Veghost

Posted by zenaps, 08-03-2004, 09:27 AM
that worked great... cheers guys

Posted by Plexi_Hosting, 08-03-2004, 09:28 AM
which solution did you use?

Posted by Shaw Networks, 08-04-2004, 02:21 AM
A blank index.html in each directory would do the trick much easier

Posted by zenaps, 08-04-2004, 03:28 AM
The index manager... no way i was usinga an index in each one, would of been there all day, as its a big site with loads of sub folders etc



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Semi-dedicated or VPS? (Views: 714)


Language: