htaccess Regular Rule Learning notes finishing

Source: Internet
Author: User

#--Represents a comment at the beginning of a line. [F]--forbidden (Forbidden): The command server returns 403Forbidden Error to the user browser [L]--last rule (last rules):tells the server to stop rewriting url[n]--after this rule has been executedNext(Next rule):tells the server to continue rewriting, instructing all rewrite instructions to execute [g]--gone (missing):command Server returns 410 GONE (no longer exists) error message [P]--proxy (proxy):tells the server to process user requests through the Mod_proxy module [C]--chain (bundle):tells the server to bundle the current rule with the previous rule [R]--redirect (redirect): The command server issues a redirect message so that the user's browser issues a rewritten/modified (override/modify) URL request [Nc]--no Case(Case insensitive):URL for client request is case-insensitive [Pt]--pass Through (release):let the Mod_rewrite module pass the rewritten URL back to Apache for further processing [or]--or (logical OR):connect two expressions with logic or, if the result is true, apply subsequent related rules [Ne]--no Escape (disable Escape):command server disables escape characters on output [Ns]--no subrequest (disables child requests):skips the current command if there is an internal child request [Qsa]--append QueryString(append query string):the command server appends the query string at the end of the URL [S=x]--skip (Skip):skips the next x-rule if a specified condition is met [E=variable:value]--environmental variable (environment variable):the command server assigns the values value to the variable variable[t=mime-type]--mime type (MIME type):declares the MIME type that the target resource belongs to []--matches a character set, such as [XYZ] can match x,y or z[]+--for example [xyz]+ will match X, y in any order, number of times,the appearance of Z [The ^]--character ^ represents the complement of the character set. [^XYZ] will match no X,a string of Y or Z [a-z]--Hyphen (-) indicates that all strings that match the letter A through letter Z a{n}--specify that the letter a appears n times and matches when the condition is met. such as x{3} matches only with XXX a{n,}--specifies that the letter a appears at least n times, such as X{3,} can be matched with XXX or xxxx etc a{n,m}--Specifies that a appears at least N to M times. ()--used to group regular expressions, strings that satisfy the first set of regular expressions are stored in the variable, and so on. If the parentheses are not regular expressions, for example (perishable)?Press 
will be able to match the press with or without the perishable prefix
^--at the beginning of the line. Note: And in brackets, the [^] have different meanings. $--at the end of the line? --such as Monzas? Will match Monza or Monzas, and Mon (za)? Will match Mon or Monza. Another example of x?matches the "null character" or an X! --Logical non. For example "!string"Will match in addition to"string"all strings outside of.--Represents any string---command Apache to "do not" rewrite URLs, such as "xxx.domain.com.*–[f] "+--matches at least one arbitrary character, such as g+matches a string that begins with G and has at least one character behind it*--matches 0 or more characters, such as ". *"matches any string| --Logical "or", unlike [or], it only matches a string, for example (x|y) matches the X or y\--escape character. You can escape the opening parenthesis (the sharp character^ Dollar sign $ exclamation point! Dot. asterisk * Pipe symbol |closing parenthesis), etc. \.--Escape is a dot character (dot regular the expression can match any character)/*-0 or more forward slashes. *--0 or more arbitrary characters (that is, matches any string, including null characters) ^$--matches "null character", "Blank line" ^.*$--matches any string (one line only) [^/.]--matches any character that is neither a forward slash nor a dot [^/.] +--matches the first character neither "forward slash" nor "point", the successor character can be a "forward slash" or "dot" string http://--match "http//" ^domain.*--matches a string starting with "domain" ^domain\.com$-- Matches only "domain.com"-d--whether the test string is an existing directory-f--test string is an existing file-s--test string refers to a file with a "not 0" value

htaccess Regular Rule Learning notes finishing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.