Forum Moderators: phranque
The (.*) part of the pattern is dangerous in several ways:
- it isn't passed as $1 to your script and therefore its value is not checked or validated: that's a duplicate content issue.
- the usage of (.*) as a pattern is very inefficient, requiring multiple back-off and retry attempts before a match can be found. If the following underscore is the very first underscore in the URL change the pattern to "match 'not an underscore' until the first underscore", like:
([^_]+_) or similar. Do not escape the period in the target filepath. Only escape them in patterns.