[eluser]WanWizard[/eluser]
There's no CI code that contains the string "error 404". Have you searched your code? It must be assigned somewhere...
Where does the value come from you're trying to set? You don't have something missing on your page that causes a second request of index.php (due to a rewrite) that triggers a 404? Enable logging and check your logs.