The following error is reported in the system logs when attempting to run a rewrite rule which substitutes a Windows file path with a text string
"Performing subst() rewrite failed, pattern did not match;"
.
Here is an example of the rewrite rule (which generates the above error) with the backslash escaped by a second backslash
+++++++++++++++
rewrite r_filename {
subst("c:\\Temp\\DNSLogging.txt","DNS", value("MESSAGE"), flags(global));
};
+++++++++++++++
Two backslashes are required plus two escapes are required for the rewrite rule to run correctly.
To get the rewrite rule working with a single substitution, extra backslashes must be added as follows
+++++++++++++++
rewrite r_filename {
subst("c:\\\\Temp\\\\DNSLogging.txt", "DNS", value("MESSAGE"), flags(global));
};
+++++++++++++++
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center