Header Referer !.*www.yourdomain.com/.* Redirect http://www.yourdomain.com/dont_steal_bandwidth.jpg
Header Referer .*\.anydomain.com/.* Return
Match .* Redirect http://www.yourdomain.com/dont_steal_bandwidth.jpg
187,190d186
< if (new_rule->neg_match) {
< return false;
< }
<
327,330d322
< if (new_rule->neg_match) {
< return false;
< }
<
346,349d337
< if (new_rule->neg_match) {
< return false;
< }
<
669c657
< if (regexec(&(rule->pattern), header, 0, NULL, 0) == 0) {
---
> if (regexec(&(rule->pattern), header, REGEXEC_NMATCH, pmatch, 0) == 0) {
739c727,731
< if (do_rewrite(url, &(rule->pattern), pmatch, rule->parameter, &(options->new_url), rule->match_loop) == -1) {
---
> if (rule->neg_match) {
> if ((options->new_url = strdup(rule->parameter)) == NULL) {
> return UT_ERROR;
> }
> } else if (do_rewrite(url, &(rule->pattern), pmatch, rule->parameter, &(options->new_url), rule->match_loop) == -1) {
803c795,799
< if (do_rewrite(url, &(rule->pattern), pmatch, rule->parameter, &(options->new_url), rule->match_loop) == -1) {
---
> if (rule->neg_match) {
> if ((options->new_url = strdup(rule->parameter)) == NULL) {
> return UT_ERROR;
> }
> } else if (do_rewrite(url, &(rule->pattern), pmatch, rule->parameter, &(options->new_url), rule->match_loop) == -1) {
UrlToolkit {
ToolkitID = devredir
Match \.(css|js|jpg|jpeg|png|gif|bmp|jar|svg|pdf|zip|swf|apk) Redirect http://www.dev.org/empty.gif
Match \.(css|js|jpg|jpeg|png|gif|bmp|jar|svg|pdf|zip|swf|apk)\? Redirect http://www.dev.org/empty.gif
}
UrlToolkit {
ToolkitID = rpzdev
#Cache the image files for 5 years
Match \.(jpg|jpeg|png|gif|bmp|svg) Expire 60 months
Match \.(jpg|jpeg|png|gif|bmp|svg)\? Expire 60 months
#Any foreign referers, check to see if they want an image
Header referer !.*.dev.org/.* Call devredir
#/image/logo/ndlogo.png
Match \.(css|js|jpg|jpeg|png|gif|bmp|jar|svg|pdf|zip|swf|apk) Return
#/image/logo/ndlogo.png?psv=3%
Match \.(css|js|jpg|jpeg|png|gif|bmp|jar|svg|pdf|zip|swf|apk)\? Return
#RequestURI isfile Return
#Match ^/(favicon.ico|robots.txt|sitemap.xml)$ Return
#All the usual GET traffic is handled with the following line
Match .*\?(.*) Rewrite /index.java?url=$1
#Prevent 405 Not Allowed POST calls with below entry
Match .* Rewrite /index.java
}