Gaga Rigs

WordPress lighttpd mod_rewrite – make pretty links

below is the code needed to have mod_rewrite working on a lighttpd server
First in your lighttpd.conf or 10-rewrite.conf enable mod_rewrite
and then paste the following code (you will need to edit the $HTTP["host"] though):
$HTTP["host"] =~ "gagrigs\.com" {
url.rewrite-final = (
# Exclude some directories from rewriting
"^/site/(wp-admin|wp-includes|wp-content|gallery2)/?(.*)" => "$0",

# Exclude .php files at root from rewriting
"^/site/(.*\.php)" => "$0",
# Handle permalinks and feeds
"^/site/(.*)$" => "/site/index.php/$1"
)
}

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>