   isCustomPreview = req.cookies["custom-partials-preview-mode"]
   path            = if section then "#{name}/#{section}" else name
 
-  return res.redirect 302, req.url.substring 7  if name in ['koding', 'guests']
+  return res.redirect 301, req.url.substring 7  if name in ['koding', 'guests']
 
   # Checks if its an internal request like /Activity, /Terminal ...
   #


app.all "/:name?/Logout", (req, res)->
  res.clearCookie 'clientId'  if req.method is 'POST'
  res.redirect 302, '/'

app.get "/humans.txt", (req, res)->
  generateHumanstxt(req, res)

app.get "/members/:username?*", (req, res)->
  username = req.params.username
  res.redirect 302, '/' + username

app.get "/w/members/:username?*", (req, res)->
  username = req.params.username
  res.redirect 302, '/' + username

app.get "/activity/p/?*", (req, res)->
  res.redirect 302, '/Activity'

app.get "/sitemap:sitemapName", (req, res)->
  {JSitemap}       = koding.models

    else "/#!#{urlOnly}#{query}"

  res.header 'Location', redirectTo
  res.send 301

app.listen webPort
console.log '[WEBSERVER] running', "http://localhost:#{webPort} pid:#{process.pid}"
