Skip to content

Instantly share code, notes, and snippets.

@samarpanda
Last active December 20, 2015 13:19
Show Gist options
  • Save samarpanda/6137806 to your computer and use it in GitHub Desktop.
Save samarpanda/6137806 to your computer and use it in GitHub Desktop.

Nginx

HttpRewriteModule

  1. the name of a variable; false vales are: empty string("", or any string starting with "0");
  2. a comparison of a variable using the = and != operators;
  3. pattern matching with regular expressions:
    ~ performs a case-sensitive match
    ~* performs a case-insensitive match i.e firefox matches Firefox
    !~ and !~* mean the opposite, doesn't match.
  4. check for existence of a file using the -f or !-f operators;
  5. check for existence of a directory using -d or !-d;
  6. check for existence of a file, directory or symbolic link using -e or !-e;
  7. check whether a file is executable using -x or !-x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment