@Aurelius The question is still not very clear, but I'm guessing you're trying to do a rewrite and instead you're doing a redirect, or something like that. Have a look at
serverfault.com/questions/214512/… which should give you the information you need