title: gorilla mux router handlers
body: <p>I can not get the gorilla mux to work..</p>
  
  <p>When requesting <code>http://www.localhost:9000</code> this is returned by the web server <code>404 page not found</code></p>
  
  <p>But this works <code>http://localhost:9000/</code> and prints <code>Hello world</code></p>
  
  <pre><code>package main
  
  import (
      "net/http"
      "fmt"
      "log"
      "github.com/gorilla/mux"
  )
  
  func Handler(w http.ResponseWriter, r *http.Request){
      fmt.Fprint(w, "Hello world")
  }
  
  func main(){
      r := mux.NewRouter()
      r.Host("www.localhost")
      r.HandleFunc("/", Handler)
      err := http.ListenAndServe(":9000", r)
      if err != nil {
          log.Fatal("ListenAndServe error: ", err)
      }
  }
  </code></pre>