First, I aplogize in advance for needing more help than the average bear on this.
I need to redirect a specific page (https://www.vitalseniorscomp.com/vote) to an external page (
https://survey.sogosurvey.com/r/100 ) . I don’t know coding, but I desperately want to understand how to do this.
WIX offers help to redirect TO a WIX site, but not FROM it.
WIX gave me a location on my dashboard as to where to place the redirect code under “custom code,” and I have selected the page where I want to place it:
(Copied from WIX dashboard)
Custom Code
Add code from a trusted third party. Learn more
Paste the code snippet here: ______________________________________
Select Domain: www.vitalseniorscom.com
Name: ______________________________
Add Code to Pages:
__All pages
X Choose specific pages: People’s Choice Voting
Place Code in:
__Head
__Body - start
__Body - end
On the WixCode wix-router.WixRouterResponse page
(https://www.wix.com/code/reference/wix-router.WixRouterResponse.html#head)
under “redirect URL”, I found this:
Redirect URL
Sets or gets the url to redirect to when responding with status codes 301 and 302.
Syntax
Type
Examples
Get the URL to redirect to
export function myRouter_Router(request) {
let redirectUrl = response.redirectUrl;
// “http://someothersite.com”
}
Set the URL to redirect to
export function myRouter_Router(request) {
response.redirectUrl = “http://someothersite.com”;
}
My humble request:
1. Can you confirm that the dashboard location WIX gave me IS the correct place to insert the code I need to use ?
2. Can you tell me where, specifically, to insert it–or them (HEAD, Body - start, Body - end)?
3. Can you send me the precise string or strings that I need to insert to order the redirect?
4. Can you offer any additional instructions that I’m missing here?
5. Should I name this thing where specified in the dashboard form above?
CODERS RULE. I bow down to you. Respect!
Thank you so very, very much.
-No Code Clue Shelley