Created
October 17, 2012 02:29
-
-
Save nodesocket/3903386 to your computer and use it in GitHub Desktop.
Rules Engine Documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rules Engine | |
| ============ | |
| The NetDNA Rules Engine provides a powerful method of controlling how edge servers interact with your content and your websites visitors. One way to think of it is a powerful tool set that allows you to do everything a *.htaccess* allows you to do with Apache on the network of NetDNA edge servers. | |
| One way to think of this is that you can use Rules Engine for the following categories of rules: | |
| - ACLS (Access control lists) for permission | |
| - Redirects | |
| - Header manipulation | |
| - Caching manipulation | |
| ### Matching ### | |
| Rules are matched against request **URIs**. For a given URI only a single rule can be applied. | |
| There are three different match types which match on the URI: | |
| - **Exact** | |
| Matches the URI exactly as defined. For example if you provide a location of `/images/logo.png` this will only match a URI of `/images/logo.png`. | |
| - **Literal** | |
| Matches the URI with an implied wildcard after. For example if you provide a location of `/images` this will match `/images` and anything after in the URI. | |
| - **Regular Expression** | |
| A valid [PCRE](http://http://en.wikipedia.org/wiki/Pcre) regular expression. An example location is `\.(?:css|js)$` which will match any filename ending in `.css` or `.js`. | |
| ### Case Sensitivity ### | |
| By default matching is case insensitive. If you wish to match case sensitively, simply check the box labeled *Match Location Case Sensitive*. | |
| ### Location ### | |
| A request URI or regular expression. | |
| ### Features #### | |
| Features are the rules/directives that you wish to apply once a match occurs. You may apply multiple features to a single rule. The table below lists the features currently supported: | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Feature</th> | |
| <th>Description</th> | |
| <th>Value</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>TTL</td> | |
| <td>The amount of time to cache content.</td> | |
| <td>A integer in seconds.</td> | |
| </tr> | |
| <tr> | |
| <td>DO-NOT-CACHE</td> | |
| <td>Prevents NetDNA from serving the content.</td> | |
| <td>Null</td> | |
| </tr> | |
| <tr> | |
| <td>301-REDIRECT</td> | |
| <td>Sends a 301 header status code, and forwards off to the value.</td> | |
| <td>A valid URL.</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| ### Rule Status ### | |
| Determines if the rule is applied on NetDNA edge servers. If the status is `inactive` the rule will not be applied to content. By default when rules are created they are `inactive`. | |
| ## Rule Priority ### | |
| The rule priority only applies if the match type is `literal` or `regular expression`. This applies if multiple request URIs match multiple rules. Use the priority to determine which single rule is applied. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment