Forum Discussion
PerBonomi
9 years agoBoss
Well, the way you use keep_before is correct, so what error are you seeing?
You may need to add this:
var referrer = ${http.request.url?keep_before("?stc=")?url}
Every redirect url I've ever seen had the parameter url encoded, so https%3A%2F%2Fcommunity instead of http://community. That's what the ?url at the end does for you.
Also, since, as far as I know, urls only ever have one ?, you could tweak it to just keep_before("?"). Just in case you ever change the parameters.
Related Content
- 5 years ago
- 11 years ago