forked from max-mapper/pages
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redirect so it works for for both vhost and regular installs
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |||
} | } |