<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免费视频| 国产一区二区免费视频| 亚洲精品无码成人片在线观看 | 免费鲁丝片一级在线观看| 免费又黄又爽又猛大片午夜| 亚洲精品国产精品乱码不99| 精品香蕉在线观看免费| 色婷婷综合缴情综免费观看 | 麻豆69堂免费视频| 亚洲网站在线播放| 亚洲人成无码网WWW| 97碰公开在线观看免费视频| 免费国产高清毛不卡片基地| 亚洲网站免费观看| 亚洲中文字幕无码久久精品1| 日本成年免费网站| 成人一区二区免费视频| 亚洲午夜在线播放| 亚洲AV无码乱码在线观看富二代| 免费无码又爽又刺激高潮| 久操视频在线免费观看| 色窝窝亚洲av网| 亚洲国产成人精品无码一区二区| 免费成人av电影| 毛片a级毛片免费播放下载| 欧洲人成在线免费| 一级人做人a爰免费视频| 亚洲а∨天堂久久精品9966| 亚洲精品无码久久久久去q| 国产裸模视频免费区无码| 中文字幕免费视频| 成年女人A毛片免费视频| 亚洲av中文无码字幕色不卡| 亚洲黄网站wwwwww| 亚洲国产精品特色大片观看完整版| 成人毛片免费观看视频大全| 免费福利视频导航| 日韩插啊免费视频在线观看| 51午夜精品免费视频| 丰满亚洲大尺度无码无码专线| 国产精品高清视亚洲精品|