URL Rewrite Using Lighttpd

URL Rewrite Using Lighttpd

You will need to enable the mod-rewrite in Lighttpd and then open up the file under /etc/lighttpd/lighttpd.conf
$HTTP["host"] =~ "www.asianeric.com" {
  url.rewrite-final = (

    # Exclude some directories from rewriting
    "^/(wp-admin|wp-includes|wp-content)/(.*)" => "$0",

    # Exclude .php files at root from rewriting
    "^/(.*.php)" => "$0",

    # Handle permalinks and feeds
    "^/(.*)$" => "/index.php/$1"
  )
}
This configuration should work well with WordPress installation using permalinks.

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *

My new Snowflake Blog is now live. I will not be updating this blog anymore but will continue with new contents in the Snowflake world!