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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -