Saturday, September 22, 2018

Error on Destination Web Site Due to an Additional ?whence= in the Redirect URL of Online Forms


Online Customer Form has a Redirect URL that is pointing to a non-NetSuite Web Site (e.g. http://www.website.com). When the redirected page loads, user receives an error that the web page cannot be loaded. The URL has changed to http://www.website.com/?whence=.

The ?whence= parameter added to the destination of the redirect is meant to let the receiving web site know what the referring site was. In some cases, these web sites are beyond NetSuite's control and their web servers are not configured well to handle these types of requests in the URL.

To resolve this, make the Online Customer form redirect to an HTML that can be uploaded to the File Cabinet, ensuring that it is available without login, and use the HTML code below at the minimum:

 <xmp>
     <html>
     <head>
     <meta http-equiv="refresh" content="5; URL=http://www.website.com">
     </head>
     <body>
     Thank you for submitting your information!
     </br>
     <a href="http://www.website.com">Click here to go back to website.com</a> if you are not redirected in 5 seconds.
     </body>
     </html>
     </xmp>


The page described above has a meta refresh property, thus, when the online customer form is submitted, then redirected to this page, this page will automatically redirect to the target destination without any parameters in its URL.

This is a more ideal solution as opposed to using a JavaScript redirect as in the case that the user using the Online Customer form uses something similar to the No Script plug-in for Firefox, where a JavaScript redirect will not work.

No comments:

Post a Comment