Skip to content

Instantly share code, notes, and snippets.

@dariok
Created February 25, 2020 00:39
Show Gist options
  • Save dariok/cbc1aea25ad3c182eb025a193d3e1f84 to your computer and use it in GitHub Desktop.
Save dariok/cbc1aea25ad3c182eb025a193d3e1f84 to your computer and use it in GitHub Desktop.
redirect wdbplus /coll/start.html to /start.html?id=coll
else if (ends-with($exist:path, "/start.html") and not(request:get-parameter-names() = 'id')) then
let $ed := substring-after(substring-before($exist:path, "/start.html"), '/')
return
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<redirect url="{$exist:controller}/edoc/start.html?id={$ed}" />
</dispatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment