29. February 2008
Geschrieben in Lighttpd, Wordpress
Wordpress, Lighttpd + Permalinks
Wer lighttpd als Webserver einsetzt, bekommt bei allen Permalinks jeweils ein “/index.php/” vor jeder URL vorrangestellt.
Abhilfe schafft folgende Rewrite-Konfiguration in der lighttpd.conf:
$HTTP["host"] =~ "blog\.kevin-k\.com" { url.rewrite = ( "/(wp-admin/|wp-content/|wp-includes/|wp-login\.php|xmlrpc\.php|robots\.txt|sitemap\.xml|wp-).*" => "$0", "^" => "index.php" ) }
Danach die Permalink-Optionen auf “Custom, specify below” stellen und dann sollte es bereits funktionieren.
Eine andere Möglichkeit wäre, den 404-handler von lighttpd immer auf die index.php weiterzuleiten:
$HTTP["host"] =~ "blog\.kevin-k\.com" { server.error-handler-404 = "/index.php?error=404" }
Ich bervorzuge jedoch die obere Möglichkeit.
Quelle: webworkblog.net