Neither search engines nor human visitors know they've been rewritten. That's fundamentally what a rewrite means. You could take every single request and change them to
RewriteRule ({blahblah}) http://www.example.com/index.php?$1 [L]
and nobody would ever know.
I get a 404 error message, not from Apache but from the own application.
Uhm, from what "own application"? 404s are sent by the server. They mean "I couldn't find the page." If there has been a redirect, the 404 refers to the redirected address; the server doesn't care whether the original form even exists. If there has been a rewrite, the 404 refers to the rewritten address. This means-- unnerving but true-- that the end user is now involved with
three locations:
--the URL visible in their address bar, which may or may not correspond to a real location
--the physical location you're trying to serve content from
--the physical location of the 404 page
Duplicate content is when more than one visible URL serves the same content. Technically that includes things like parallel with-and-without www domain names, and the official form {blahblah}/ vs. the full name {blahblah}/index.html. But g### is just barely bright enough to disregard those.
Redirecting many different requests to the same URL is not Duplicate Content. Not necessarily a good idea, but not Duplicate Content. Rewriting many different requests to the same physical location (with the same parameters)
is Duplicate Content.
Every time I see this thread title I think "Language" in the old-fashioned sense, as if you needed to rewrite users' cussing.