regex - htaccess cannot compile regular expression -


i got error message:

rewriterule: cannot compile regular expression

'([0-9]+)/((?!thumb)[a-za-z0-9_-\\s]+)\\.([a-za-z0-9_-\\s]+)$' 

and code problem occurred is:

rewriterule ([0-9]+)/((?!thumb)[a-za-z0-9_-\s]+)\.([a-za-z0-9_-\s]+)$ ../members/download.php?u=$1/$2.$3 

in character set class, have:

_-\s 

which means, in context, capture characters ascii values between of _ , \s. follows:

  1. _ @ 95
  2. \s 32

and, range thus, invalid; leading error.

put - @ end of class make pattern work:

rewriterule ([0-9]+)/((?!thumb)[a-za-z0-9_\s-]+)\.([a-za-z0-9_\s-]+)$ ../members/download.php?u=$1/$2.$3 

Comments