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