Skip to content

Commit

Permalink
Set up 301 redirect for old direct access URLs (RPB-38)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Nov 22, 2023
1 parent 3af9021 commit de21a9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/nwbib/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ public static Promise<Result> searchSpatial(final String id, final int from, fin
"https://rpb.lobid.org/spatial#n" + id, "", from, size, "", "", "", false, "", "",
"", "", format)));
}

public static Promise<Result> showPl(String name, String db, int index, int zeilen, String s1) {
return Promise.pure(movedPermanently("https://rppd.lobid.org/" + s1));
}

/**
* @param id The resource ID.
* @param format The requested resource format (html, json).
Expand Down
1 change: 1 addition & 0 deletions conf/nwbib.routes
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ DELETE /stars/:id controllers.nwbib.Application.unstar(id)
GET /assets/*file controllers.Assets.at(path="/public", file)
GET /robots.txt controllers.Assets.at(path="/public",file="robots.txt")

GET /cgi-bin/wwwalleg/:name.pl controllers.nwbib.Application.showPl(name, db ?= "rnam", index: Int ?= 1, zeilen: Int ?= 1, s1)
GET /o:id controllers.nwbib.Application.searchSpatial(id, from:Int?=0, size:Int?=25, format?="html")
GET /:id controllers.nwbib.Application.show(id, format ?= "")

0 comments on commit de21a9a

Please sign in to comment.