RewriteRule ^coaching/complete\sin\s\(30\smin,\s1\shour...\) http://www.example.com/coaching/complete+in+%2830+min-+1+hour...%29-11
however it is giving output as
what is the problem in my code?
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 ')'.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki