fixes #5773 - redirect to referrer URL that includes page and search

This is needed since the `request.referrer` is the `show` page, so without this is returns to `show` rather than `index`.