Possible Duplicate:
“Warning: Headers already sent” in PHP
Hi there I'm cannot get 404 status code for pages that aren't in my site. My .htaccess looks like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
And so all my pages go to index.php from there they go to bootstrap and there it's send to and error controller. In the error View is make a:
header("HTTP/1.1 404 Not Found");
but it give me an error that "Cannot modify header information - headers already sent by". Now i do get a 200 Ok status if i delete this line. I think this is because i send everything to index.php and that status is 200 Ok. So how can make the difference for those files from .htaccess? Or do you have another way to deal with this? Thanks