Okay, how is pagename defined? You've got to specify that without being able to conflict with actual (existing) pagenames.
Then, why kill an existing query string?
Then, ^/ will only work on Apache 1.x servers, not on Apache 2.x servers. That's been the case for several years now.
Finally, what do you expect (.*) to match? It will match EVERYTHING (or NOTHING) and that's absolutely ridiculous code to use. It's so bad that I have created a Standard Rant to use:
The use of "lazy regex," specifically the
atom, (.*), and its close relatives, is the NUMBER ONE coding error of newbies BECAUSE it is "greedy." Unless you provide an "exit" from your redirection, you will ALWAYS end up in a loop!
Again, have a look at the tutorial and you'll learn how to do it correctly. Many have already.