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

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

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

    jojo's blog--快樂憂傷都與你同在
    為夢想而來,為自由而生。 性情若水,風起水興,風息水止,故時而激蕩,時又清平……
    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 閱讀(373) 評論(0)  編輯  收藏 所屬分類: Linux 技術相關

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

    常用鏈接

    留言簿(6)

    隨筆檔案

    文章分類

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 一级一级毛片免费播放| 日韩在线视精品在亚洲| 免费91麻豆精品国产自产在线观看 | 麻豆国产精品免费视频| 亚洲成av人影院| 99久久国产免费-99久久国产免费| 亚洲国产精品成人| 五月天婷婷精品免费视频| 亚洲天堂在线视频| 国产精品免费久久久久久久久 | 久久亚洲国产成人精品性色| 无码国产精品一区二区免费vr| 亚洲免费视频网站| 成人免费福利视频| 亚洲国产精品精华液| 亚洲AV无码乱码在线观看| 中国一级毛片视频免费看| 亚洲人成网站影音先锋播放| 97热久久免费频精品99| 国产成人va亚洲电影| 中文字幕专区在线亚洲| 99视频有精品视频免费观看| www.亚洲日本| 亚洲国产天堂久久久久久| 久久久久久久久久国产精品免费| 亚洲成人免费网址| 日本不卡免费新一二三区| h在线看免费视频网站男男| 亚洲无删减国产精品一区| 美女网站免费福利视频| 男女猛烈激情xx00免费视频| 国产精品久久久亚洲| 成人免费在线视频| 精品国产一区二区三区免费| 亚洲冬月枫中文字幕在线看| 夜色阁亚洲一区二区三区| **实干一级毛片aa免费| 免费观看又污又黄在线观看| 亚洲福利视频网址| 亚洲国产人成精品| 无码中文在线二区免费|