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

Jesse Newland http://jnewland.com

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

Lighty redirect

Redirect http://www.jnewland.com and http:///blog.jnewland.com, both still indexed by Google, to http://jnewland.com. 'www' is so 1995 :)

$HTTP["host"] =~ "^(www.|blog.)" {
    url.redirect = (
        "^/(.*)" => "http://jnewland.com/$1",
        "" => "http://jnewland.com/",
        "/" => "http://jnewland.com/"
    )
}

Feedburner Redirect

Redirect everyone except the feedburner spider to FeedBurner's cached version.

$HTTP["host"] =~ "^(www.|blog.)?jnewland.com" {
    $HTTP["useragent"] !~ "FeedBurner" {
        url.redirect = (
            "/xml/rss20/feed.xml" => "http://feeds.feedburner.com/jnewlandcom"
        )
    }
}
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS