Skip to content

Commit

Permalink
redirect so it works for for both vhost and regular installs
Browse files Browse the repository at this point in the history
  • Loading branch information
jchris committed Aug 13, 2010
1 parent 8bdca8d commit 037942e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions shows/redirect.js
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,8 @@
function() { function(doc, req) {
var redirect = require("vendor/couchapp/lib/redirect"); var redirect = require("vendor/couchapp/lib/redirect");
// todo make this work in both modes // this would be the right way to do it (absolute URI)
return redirect.permanent("/page/index"); // except req.path reflects the post-rewrite state
// return redirect.permanent([""].concat(req.path,"page","index").join("/"));
// for now, cheat and do a relative Location header
return redirect.permanent("page/index");
} }

0 comments on commit 037942e

Please sign in to comment.