Apache configuration: Regex to disable access to files/directories beginning with a dot

后端 未结 4 1974
你的背包
你的背包 2021-01-31 18:00

I want to disable access to any file OR directory, whose name begins with a DOT. I came up with the following, but it disables access to files/directories beginning with DOT onl

4条回答
  •  遥遥无期
    2021-01-31 18:44

    This works perfectly for me (Apache 2.4):

    
        Require all denied
    
    

    Denies any URL that contains a component beginning with a dot (file or directory).

提交回复
热议问题