Let's take your example,
http://mysite.com/cell-phone-c-25.html. I don't believe that Apache will consider any part of it a QUERY_STRING, so the RewriteCond should fail (%{QUERY_STRING} == '', I
think) and none of the RewriteRules should ever fire. That's why I suggested commenting out the RewriteCond to see if that helps.
Next, this should match the rule
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}. What's fed to the regex parser is
cell-phone-c-25.html, so I would expect $1 to be
cell-phone and $2 to be
25. This should be replaced by (in the current directory, /)
index.php?cPath=25&. I don't think there's any harm in that trailing '&', but as I said before, I think QUERY_STRING will be empty. Is a call to /index.php?cPath=25 enough to do something interesting? You said in your first post that it worked OK. Just for grins, you might replace "index" by "/index" in the rule and see if that makes any difference. Also change ".html" to "\.html" in the regex pattern.
Are you still getting a 404 error, or something else now? Does the 404 error page (/404.php) show what directory and file it's trying to access? You may have to temporarily add
[R=301] to the RewriteRule to see what the rewritten URL is. Can you confirm that this
.htaccess file is in the right place and is functioning? Try putting something nonsense in it to force an error (such as
RewriteRule ^(.*)$ /this_will_fail?$1 [R=301]). At least you'll know that it's reading and processing the file. By the way, you need to clear your browser cache after changing
.htaccess,
By the way, your first RewriteRule ends with %1. Does %1 have a value? The "options" value from the RewriteCond? I'm not familiar with this part of URL rewriting (the online documentation is infuriatingly vague), so it's possible it does (How I wish that .htaccess had some way to display stuff like that, for debugging!). Then you have a second RewriteRule which matches the same pattern as the first. My guess is that if the first matches, the second may not (as the URL has been rewritten by this time). What are you trying to do there?
My experience has been with Apache v1, so if this server has Apache v2, it's possible that it doesn't work quite the way I expect. Also, it's a very generic
.htaccess, including
php_value statements, which need to be moved to a
php.ini file if you want to use them (note the use of PHP Register Global variables, which is unneeded in recent versions of osCommerce).