Here is the code i'm using in the .htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteRule product_detail/name/(.*)/ product_detail.php?name=$1
RewriteRule product_detail/name/(.*) product_detail.php?name=$1
I would suggest being explicit with your target URLs. Also you do not have any flags on your RewriteRules. If you get a match you typically want to use at least an [L,NC] if it's a rewrite and an [R=301,L,NC] or [R=302,L,NC] if its a permanent or temporary redirect, respectively.
For example, if the above RewriteRules exist in the .htaccess in your root folder I would use something like:
The [L] flag tells it to break out of the .htaccess and execute the rule. If you omit the [L] flag, Mod_Rewrite will continue to fall thru executing subsequent rules. This allows you to daisy chain rewrite rules. So it continues to fall thru. And since it likely doesn't match another rule later in the .htaccess, it never gets executed.