How to redirect a URL that contains an argument


#1

Our software’s Help documentation is gated in a folder on a Microsoft box. The URL that the software pushes to call the documentation is sent with an argument. How do we ensure an argument remains with a redirect?

For example, domain www.mybusiness.com is being transferred from Windows box server to Hubspot. But the URL, www.mybusiness.com/help?A=V needs to be redirected to another URL, help.mybusiiness.com, on the old server where the gated documents live.

How do I do this?


#2

@svigneault Could you grab the parameter from your current URL right before you make the call and then add it to the call to the new site? You can read up on using the window location object in Javascript.

http://www.w3schools.com/js/js_window_location.asp

Essentially you can in the end make a window.href(“Insert new website with parameter here”); call

To expand on this.

Step 1. Grab the parameter from the current URL

Step 2. Add that parameter to the redirect call.

Step 3. Make redirect call

steps 2 and 3 can be done at the same time.