Lighttpd rewrite rules for WordPress sites

By polfilm,

  Filed under: Lighttpd, Ubuntu, Webuzo
  Comments: None

  # Handle 404 errors
  server.error-handler-404 = "/index.php"
 
  # Rewrite rules
  url.rewrite-final = (
 
    # Exclude some directories from rewriting
    "^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
 
    # Exclude .php files at root from rewriting
    "^/(.*.php)" => "$0",
 
    # Handle permalinks and RSS feeds
    "^/(.*)$" => "/index.php/$1"
  )

Be the first to write a comment.

Your feedback

You must be logged in to post a comment.