Question : simple .htaccess php rewrite rule not working

I'm trying to clean up my URLs by turning this:

into this:

Below is what I have currently in my .htaccess (in root public_html) and does not work.  Can someone please tell me what I am doing wrong?
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^photo-([0-9]+)/$ index.php?do=photocart&viewImage=$1 [R, NC]

Answer : simple .htaccess php rewrite rule not working

OK, let me try again. Scrolling up and down the page is really messing this up.
The following code in the root .htaccess:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{QUERY_STRING} photo=(.+)
RewriteRule ^photos/(.*) /photos/index.php?do=photocart&viewImage=$1 [QSA]

Turns into

I used some of my old code but forgot to change bits when I was scrolling up and down looking at your requirements, sorry. Hope this one works though
Random Solutions  
programming4us programming4us