Question : simple .htaccess php rewrite rule not working

I'm trying to clean up my URLs by turning this:
http://www.domain.com/photos/index.php?do=photocart&viewImage=180703

into this:
http://www.domain.com/photos/photo-180703

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?
1:
2:
3:
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 http://domain.com/photos/xxxxxxx into http://domain.com/photos/index.php?do=photocart&viewImage=xxxxxxx

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