Without knowing your directory structure its difficult to say, but Iwould guess that the result of the url rewrite is sending you somewhere you didnt expect and whereever that is its not within the confines of your servers directory structure.
Docs on use of mod_rewrite
[
httpd.apache.org]
There is also a loggin feature that will log what the url rewriter is doing, step by step that can help when debugging rewrite rules.
[
httpd.apache.org]
Suggest you will have to do a little research and debugging