北京时间:
 
 
 首页 
 
 
 
 
 
 
 洛杉矶论坛 
   
洛杉矶华人论坛 |  搜索  |  注册  |  登陆  |  FAQ 
 
 
How to disable directory browsing using .htaccess

 
发表新帖   回复帖子    洛杉矶华人论坛 首页 -> 技术交流
阅读上一个主题 :: 阅读下一个主题  
留言
How to disable directory browsing using .htaccess  引用并回复
 
发布人: Mrs LA   发布于: 2008/05/30, 9:18 pm

How to disable directory browsing using .htaccess - Apache Web Server

Apache web server allow directory browsing by default. It’s always good to disable directory browsing in security aspect. To disable directory browsing in apache web server you need to edit the httpd.conf or .htaccess

Disable directory browsing using .htaccess:-

* Open your .htacces file

* Look for Options Indexes

* If Options Indexes exists modify it to Option -Indexes or else add Options -Indexes as a new line

* The directory browsing feature should be disable by now

Disable directory browsing using httpd.conf:-

* Open your httpd.conf, normally it’s located at /usr/local/apache/conf or /etc/httpd.conf

* Go to your own Virtual Host settings and look for “Options Indexes”

* Change the Indexes to -Indexes if Option Indexes exists or else add the Options -Indexes line

* Restart your apache web server.

* The directory browsing feature should be disable by now

Disable directory browsing in CPanel Share Hosting enviroment:-

* Login to your CPanel

* Click on Index Manager

* Directory will be list down. Click on the directory name which you want to disable the directory browsing

* Select No Index and click Save

* The directory browsing feature should be disable by now

Once you disable directory browsing, visitor will not able to browse your directory by accessing the directory directly (if there is no index.html file). This will protect your files from exposing to the public.




_________________
支持洛杉矶华人,点评洛杉矶华人商家
返回页首
阅览成员资料 (Profile) 发送私人留言 (PM)
从以前的帖子开始显示:   
点评这篇文章
 
1 2 3 4 5
1个人参与评分
发表新帖   回复帖子    洛杉矶华人论坛 首页 -> 技术交流 论坛时间为 PST (美国/加拿大)
1页/共1   
转跳到:  


 
Copyright 2006-2008 www.ChineseInLA.com All rights reserved. Privacy Policy