Skip to content

Instantly share code, notes, and snippets.

@Nyr
Nyr / gist:5124270
Last active Dec 14, 2015
lighttpd rewrite rules for archive-my-tweets
View gist:5124270
# Rewrite for tweets.nyr.be
$HTTP["host"] =~ "(^|\.)tweets.nyr\.be$" {
url.rewrite-once = (
# Single Tweet
"^/([0-9]+)/?$" => "/index.php?id=$1",
# Tweets by date
"^/archive/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$" => "/index.php?year=$1&month=$2&day=$3",
"^/archive/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)/?$" => "/index.php?year=$1&month=$2&day=$3&page=$4",
"^/archive/([0-9]{4})/([0-9]{2})/?$" => "/index.php?year=$1&month=$2",
"^/archive/([0-9]{4})/([0-9]{2})/page/([0-9]+)/?$" => "/index.php?year=$1&month=$2&page=$3",