apache - Regex is deleting the last character -


in implementing clean urls wanted map http://www.pikspeak.com/iframe/3/bird?autoplay=true http://www.pikspeak.com/iframe.php?id=3&img=bird&autoplay=true using following regex

rewriterule ^/iframe/([^/\.]+)/([^/\.?]+)\\?([^/\.]+) /iframe.php?id=$1&img=$2&$3 

but problem last character of value of img parameter (in 'bird') deleted, i.e. 'bir'. can please out issue.

other not able to 'autoplay' parameter in php.

thanks in advance

  1. i think \\? mean \?.
  2. no need escape \. in character classes.
  3. instead of trying match query string, use [qsa] modifier.
rewriterule ^/iframe/([^/.]+)/([^/.]+)$ /iframe.php?id=$1&img=$2 [qsa]

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -