티스토리 뷰
- You can prefix the pattern string with a '
!
' character (exclamation mark) to specify a non-matching pattern. - There are some special variants of CondPatterns. Instead of real regular expression strings you can also use one of the following:
- '<CondPattern' (lexicographically precedes)
Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically precedes CondPattern. - '>CondPattern' (lexicographically follows)
Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically follows CondPattern. - '=CondPattern' (lexicographically equal)
Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString is lexicographically equal to CondPattern (the two strings are exactly equal, character for character). If CondPattern is""
(two quotation marks) this compares TestString to the empty string. - '-d' (is directory)
Treats the TestString as a pathname and tests whether or not it exists, and is a directory. - '-f' (is regular file)
Treats the TestString as a pathname and tests whether or not it exists, and is a regular file. - '-s' (is regular file, with size)
Treats the TestString as a pathname and tests whether or not it exists, and is a regular file with size greater than zero. - '-l' (is symbolic link)
Treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link. - '-x' (has executable permissions)
Treats the TestString as a pathname and tests whether or not it exists, and has executable permissions. These permissions are determined according to the underlying OS. - '-F' (is existing file, via subrequest)
Checks whether or not TestString is a valid file, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - it can impact your server's performance! '-U' (is existing URL, via subrequest)
Checks whether or not TestString is a valid URL, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - it can impact your server's performance!This flag only returns information about things like access control, authentication, and authorization. This flag does not return information about the status code the configured handler (static file, CGI, proxy, etc.) would have returned.
Note:
All of these tests can also be prefixed by an exclamation mark ('!') to negate their meaning. - '<CondPattern' (lexicographically precedes)