开发者

this regular expression's meaning

I saw this in httpd.conf (of my mac)

#                                                                           开发者_开发百科                        
# The following lines prevent .htaccess and .htpasswd files from being                              
# viewed by Web clients.                                                                            
#                                                                                                   
<FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

that expression's former part(before or('|') sign) looks 'starting h or H, followed by T or t.

but what does latter part mean?

just 'starting D or d followed by S or s and underscore and S or s? then, what is that?

Thank you in advance.


it is used to match files like:

  • .htaccess (Apache configuration)
  • .DS_Store (Mac OS X Desktop Services Store file)


This will match any file which begins with .ht or .ds_s, in a case-insensitive way.


It matches anything starting either with ".ht" or ".ds_s" case insensitive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜