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

redirecting wordpress xml links to typo in lighttpd (See related posts)

Update: go for the simplest regex possible...

$HTTP["host"] =~ "awesomerailsapp.com" {
  server.error-handler-404 = "/dispatch.fcgi"
  server.document-root = "/awesomerailsapp/public/"
  url.redirect = (
    "^/feed/atom" => "http://awesomerailsapp.com/xml/atom/feed.xml",
    "^/feed" => "http://awesomerailsapp.com/xml/rss/feed.xml",
    "^/wp-rss2\.php" => "http://awesomerailsapp.com/xml/rss/feed.xml",
    "^/wp-atom\.php" => "http://awesomerailsapp.com/xml/atom/feed.xml",
    # my wp article format to typo's
    "^/(\d{4})/(\d{2})/(\d{2})/([\w-_]+)" => "/articles/$1/$2/$3/$4"
  )

  # bring on the rest of the config
}

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts