Need to read param value from URL when Page is not found

In my site, when page is not found, I want to redirect it to another website by appending same parameter from url.
In URL, it shows param for which 404 is occured. But when I tried ‘wixLocaion’ to read params on my custom 404 error page, it is returning “/error404”.
Is there any way to read the actual param value for which custom 404 error page is redirected ?

Here is case,
On my site if I tried “getpaths. com/abcd”, it will shows custom 404 error page.
But I want to redirect it to “app.getpaths. com /paths#/abcd”
So I want to read “/abcd”.
Please give your valuable feedback and help on this.
Thanks

You could create your own Router , and use the redirect() function to redirect to the page that you want. See Corvid: Creating a Router to learn how to create and use a Router.