I want to display a 404 Error if a user reaches a page that exists but I don\'t want him/her to see.
I don\'t want to do redirect (that would cause the address bar t
What you write makes it hard to us to understand.
I want to redirect any incoming user to the 404 Error Page if s/he reaches the page I don't want him/her to reach.
So, a person reaches a page that exists?
If the person reaches for example a protected page that he/she is not supposted to see. Using header is the best way. Your options are to echo meta-refresh or javascript, but header is much cleaner. You could display something like You do not have permission to do that! which is pretty common on the web. If you don't want to redirect you could display a 404 "fake message" via the header.
If you are talking about someone reaching a 404 page, a file that does not exists, you only option is to use .htaccess