# htaccess not rewriting as intended!

RewriteRule ^coaching/complete\sin\s$$30\smin,\s1\shour...$$

http://www.example.com/coaching/complete+in+%2830+min-+1+hour...%29-11


Output Expected

 http://www.example.com/coaching/complete+in+(30+min-+1+hour...)-11


however it is giving output as

http://www.example.com/coaching/complete+in+830+min-+1+hour...9-11

what is the problem in my code?

Could you please add, what URL do you want to rewrite to what (no regexp, no urlencoding)

That's not a complete rule - you need to show us what it's supposed to look like afterwards. Also, min, != min-, so the rule correctly won't match the URL.

i just breaked the first line so that it is readable i think u get me?

the problem is that %2 is actually interpreted by mod_rewrite as a back-reference to the last matched RewriteCond pattern's second group match.

If there's no such reference, it's simply expanded as an empty string.

So you have first to escape the percent characters like this:

RewriteRule ^coaching/complete\sin\s$$30\smin,\s1\shour...$$ http://www.example.com/coaching/complete+in+\%2830+min-+1+hour...\%29-11


However, you also need to use the [NE] flag if you really want those characters to appear as is in the output url, else mod_rewrite will escape them into '(' and ')'.