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 */
Thanks. Just what i need.
April 27, 2011 at 2:28 pm Normes
Приветики! Читаю не первый день странички. Да вот скорость соединения хромает. Как можно подписаться на вашу RSS-ленту? Хотел бы читать вас и дальше.
July 20, 2009 at 12:32 am Антон
Пока просто буду знать))))
June 23, 2009 at 10:01 pm Знакомства
Я извиняюсь, но, по-моему, Вы не правы. Предлагаю это обсудить.
June 23, 2009 at 4:13 pm Знакомства
Да, мы можем обсудить. Вы говорите Английский?
June 23, 2009 at 5:36 pm webmasterview
Hello, I found your blog in a new directory of blogs. Your blog looks good. Have a nice day.
June 2, 2009 at 1:33 pm alex farguson