Group literal string in htaccess regex pattern
===

I need to rewrite URLs similar to

    /b

to

    /img/b.png

as well as URLs similar to

    /b_c

to

    /img/b_c.png
    

I have tried this:


    RewriteRule ^b(?:/_c/)$     /img/$1.png

Which works for the first case but not the second (it is not matching "_c" and grouping it).

I need the literal string "_c" to be grouped and placed in the rewritten URL.

How can I accomplish this?
