TAG | Wordpress
I’ve tried to use wordpress with lighttpd, and search around for how to do the url-rewrite.
I’ve tried to compare different url-rewrite
r00tshell.com » Blog Archive » Wordpress – Lighttpd – Permalinks – Without rewrite.
1. 在 lighthttpd 的 config file 當中 wordpress 的部份 (vhost 或 subolder) 加上
server.error-handler-404 = "<your_wordpress_root>/index.php"
2. 修正一下你的 theme 的 404.php
在第一行加上
< ?php header('HTTP/1.1 404 Not Found');?>
如果你是用 CGI / FASTCGI 設定的話就是
< ?php header('Status: 404 Not Found',false,404);?>
總共才不過兩佪 file 兩行而已,而且執行起來的效率很高。
不但語意上簡單而正確,也能使用顯示自訂的 wordpress 404 頁面。
如果配合 rewrite 的話也可以更一步減少 server 執行 stat() 檢查檔案是否存在而作出的 IO operation
已經接近完成,大約90%
轉移了 server
更新了 theme
昇級了 wordpress
修理了有問題的超連結
