ok,
still not sure that I understand your problem but..
What I would suggest is that you look at the following issues.
What differences are there in the PHP config options (use a page that contains the command phpinfo(); to check that)
Are you perhaps using variables such as the document root in the code and the value is not set correctly locally?
Originally you mentioned that an .htaccess file was causing problems, what was that file trying to achieve?
I would suggest that if you want further help you will need to post some actual code examples not just a vague error message, but if posting code please remember to use the PHP code tags that the forum provides since that makes the code more readable.
Posting the contents of the original .htaccess file would also probably help.