<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    jojo's blog--快樂(lè)憂(yōu)傷都與你同在
    為夢(mèng)想而來(lái),為自由而生。 性情若水,風(fēng)起水興,風(fēng)息水止,故時(shí)而激蕩,時(shí)又清平……
    posts - 11,  comments - 30,  trackbacks - 0
    <Location /obcart/index.php>
     Order Deny,Allow
     Deny from All
     Satisfy All
    </Location>

    RedirectMatch 404 /".svn(/|$)

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This is straight from the mailing list with grateful thanks to Ryan Schmidt.

    Sometimes I can be a bit slow so I hadn't even considered blocking access to the .svn folders on this and other sites I maintain. I have now! There are two solutions:

    <Files ".svn">

    Order allow,deny

    Deny from all

    </Files>

    <DirectoryMatch "/".svn/">

    Order allow,deny

    Deny from all

    </DirectoryMatch>

    and:

    RedirectMatch 404 /".svn(/|$)

    ====================================================================================================


    Apache Tips & Tricks: Deny access to some folders

    Applies: apache 1.3.x / apache 2.0.x
    Required apache module: mod_access
    Scope: global server configuration, virtual host, directory, .htaccess
    Type: security

    Description: How to deny access to certain folders and the files inside them.
    Useful: to deny access to certain folders containing private information (log files, source code, password files, etc.). The example shown here will address the question posted by Saul Howard on how to deny access to all the subversion directories (.svn).

    I a previous tip (Deny access to certain file types) I have showed how we can deny access to files using a particular filename or all the files with a particular extension or any regexp we can match the files. In this post we will block access to folders, so instead of using the <Files> directive we will be using the <Directory> section.

    Allow/Deny Directive in <Directory>

    Let’s see how we can deny access to all the .svn folders that exist on the server.
    In order to achieve this we will add the following configuration lines in the appropriate context (either global config, or vhost/directory, or from .htaccess):

    <Directory ~ "".svn">
    Order allow,deny
    Deny from all
    </Directory>

    Similar to this we can deny access to other folders we might need…

    Note: this will show a Forbidden page (code 403) even if the folder does not exist and it is just called from the browser in the url.
    Another way how this can be quickly accomplished is by using a Rewrite rule:

    RewriteRule ^(.*/)?"".svn/ - [F,L]

    or using a redirect:

    RedirectMatch 404 /"".svn(/|$)

    (in this last example I am using 404 as the returned code so this looks like the folder doesn’t exist on the server; of course if you prefer you can return 403 - forbidden code).

    Go to:
    Main page of all my Apache Tips & Tricks




    posted on 2009-04-20 15:07 Blog of JoJo 閱讀(374) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): Linux 技術(shù)相關(guān)

    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(6)

    隨筆檔案

    文章分類(lèi)

    文章檔案

    新聞分類(lèi)

    新聞檔案

    相冊(cè)

    收藏夾

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 成年女人喷潮毛片免费播放| 亚洲午夜精品第一区二区8050| 亚洲精品成a人在线观看☆ | 人人狠狠综合久久亚洲高清| 一级特黄aaa大片免费看| 亚洲狠狠综合久久| 高清国语自产拍免费视频国产| 中文字幕成人免费高清在线视频| 亚洲电影免费观看| yy6080亚洲一级理论| 最近中文字幕mv免费高清视频8| 精品久久亚洲一级α| 亚洲va在线va天堂va不卡下载| 全免费一级午夜毛片| 黄色网站软件app在线观看免费| 国产亚洲精品VA片在线播放| 国产亚洲老熟女视频| 中文字幕无码成人免费视频| 久久国产精品免费一区| 亚洲色少妇熟女11p| 亚洲AV无码乱码国产麻豆| 免费观看理论片毛片| 久久99精品免费视频| 特级做a爰片毛片免费看| 激情内射亚洲一区二区三区爱妻| 亚洲精品美女久久久久99| 免费的一级片网站| 在线看无码的免费网站| 国产精品免费久久久久久久久| 一本色道久久综合亚洲精品蜜桃冫 | 成人浮力影院免费看| 中文字幕在线成人免费看| 亚洲欧洲日韩国产一区二区三区| 亚洲AV无码一区二区三区系列 | 亚洲 欧洲 视频 伦小说| 亚洲av午夜成人片精品网站 | 亚洲另类无码一区二区三区| 18亚洲男同志videos网站| 国产亚洲成归v人片在线观看| 国产成人免费a在线视频色戒| 成人女人A级毛片免费软件|