logo

This is an old version of this answer!

Return to the current answer
Hello,

This will work out for you. Make sure that mod_rewrite line has been uncommented in the lighttpd file if you have your own server/VPS. If you have a shared hosting or a managed hosting, you can ask them to enable mod_rewrite module for you.

If you have a Wordpress blog installed in the root of your domain or sub-demain, you have to use:
$HTTP["host"] =~ "{yourdomain}" {
var.app = "{yourdomain}"
accesslog.filename = base + "/logs/" + app + ".access.log"
server.errorlog = base + "/logs/" + app + ".error.log"
load php app
url.rewrite = (
"^/(wp-.+).*/?" => "$0",
"^/(sitemap.xml)" => "$0",
"^/(xmlrpc.php)" => "$0",
"^/(.+)/?$" => "/index.php/$1"
)
}


If you use a Wordpress blog installed in a sub-folder (e.g. /blog/)

$HTTP["host"] =~ "{yourdomain}" {
var.app = "{yourdomain}"
accesslog.filename = base + "/logs/" + app + ".access.log"
server.errorlog = base + "/logs/" + app + ".error.log"
load php app
url.rewrite = (
"^/?$" => "/blog/index.php",
"^/blog/(wp-.+)$" => "$0",
"^/blog/xmlrpc.php" => "$0",
"^/blog/sitemap.xml" => "$0",
"^/blog/(.+)/?$" => "/blog/index.php/$1"
)
}


Note: the xmlrpc.php rule is necessary for external access and the sitemap.xml file is something for Google Sitemaps.

ulgaming | 01/20/10 at 3:29am

This is an old version of this answer!

Return to the current answer