if you want to use WordPress functions in external PHP scripts, you can do it by including wp-blog-header.php file. But the script may send “404 File not Found” header in some cases. For example, if you name it ‘index.php’, put it in a directory and call the directory, the page may appear in your browser, but using a header checking tool like web developer toolbar, you can see that it actually sends 404 headers. The same thing happens if you use mod_rewrite to do internal redirection to your script. Your page will not get indexed by Search Engines.
The fix: add “200 OK” header.
require('/path/to/wordpress/wp-blog-header.php'); header("HTTP/1.1 200 OK"); /* Your code goes in here */