Last active
December 14, 2015 17:48
-
-
Save Nyr/5124270 to your computer and use it in GitHub Desktop.
lighttpd rewrite rules for archive-my-tweets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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", | |
"^/archive/([0-9]{4})/?$" => "/index.php?year=$1", | |
"^/archive/([0-9]{4})/page/([0-9]+)/?$" => "/index.php?year=$1&page=$2", | |
# Tweets by client | |
"^/client/(.*)/$" => "/index.php?client=$1", | |
"^/client/(.*)/page/([0-9]+)/?$" => "/index.php?client=$1&page=$2", | |
# Paginated Index | |
"^/page/([0-9]+)/?$" => "/index.php?page=$1", | |
# Favorites | |
"^/favorites/?$" => "/index.php?favorites=1", | |
"^/favorites/page/([0-9]+)/?$" => "/index.php?favorites=1&page=$2", | |
# Stats | |
"^/stats/?$" => "/index.php?method=stats", | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment