Hey guys, I need requests mysite.com/app/blah… to be redirected to another link. Looks like Wix doesn’t allow to use that ‘app’ prefix in routers. (just adding it to the code doesn’t work, when I try to create it using ‘+’ in Editor it says that prefix is unavailable)
Is there any way to make it work?
The deal is that links with that way were generated for that site when it was on the different platform and a lot of users still have those links and have to be redirected. Any ideas?
Hello Anna,
To get the prefix you can use: wixLocation.prefix . And to navigate the browser to another web page you can use wixLocation.to(“/about-me”). For more about those functions check: https://www.wix.com/code/reference/wix-location.html#
Also, check this link wix-site-frontend - Velo API Reference - Wix.com for more about prefix in routers.
Massa
Thanks for your answer but it is not what I’m looking for. The question was about router.
Those urls mysite.com/app/blah … I was talking about do not exist on the site. I also can’t create such page to add the code to the onLoad section, because URL have to contain ’ form.cfm ’ and it is not possible.
So I need the router to do it.