Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Rick Olson http://techno-weenie.net

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

redirecting wordpress xml links to typo in lighttpd

Update: go for the simplest regex possible...

   1  $HTTP["host"] =~ "awesomerailsapp.com" {
   2    server.error-handler-404 = "/dispatch.fcgi"
   3    server.document-root = "/awesomerailsapp/public/"
   4    url.redirect = (
   5      "^/feed/atom" => "http://awesomerailsapp.com/xml/atom/feed.xml",
   6      "^/feed" => "http://awesomerailsapp.com/xml/rss/feed.xml",
   7      "^/wp-rss2\.php" => "http://awesomerailsapp.com/xml/rss/feed.xml",
   8      "^/wp-atom\.php" => "http://awesomerailsapp.com/xml/atom/feed.xml",
   9      # my wp article format to typo's
  10      "^/(\d{4})/(\d{2})/(\d{2})/([\w-_]+)" => "/articles/$1/$2/$3/$4"
  11    )
  12  
  13    # bring on the rest of the config
  14  }
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS