How to Hide a Redirect

How to Hide a Redirect thumbnail
A website user's visit can be tracked with a URL redirect.

A Uniform Resource Locator (URL) redirect will track and record the number of clicks a website receives from visitors. However, if not hidden, the tracking will appear to the website visitor. This can tarnish the look of a website. It also can deter visitors, since many people are wary of being tracked online. With a few lines of code, the redirect can be hidden from public view.

Instructions

    • 1

      Open your Web page code in a text editor or other code editing program. Click the file name or icon of the text editing software to launch the program. Click "File" and "Open," then the file name of your Web page to open your code in the text editor.

    • 2

      Type "window.status" in the line of code that displays your URL in the browser. This line of code should appear as follows:

      "<a href="http://www.sell.com/referrer=225"onMouseOver="window.status='http://www.yourwebsite.com';return true" onMouseOut="window.status=''">Click here</a>"

      Replace "yourwebsite" with the name of your website.

    • 3

      To change the URL displayed in all browsers, type the following code that will create and define a JavaScript function to develop the redirect:

      "<script language="javascript" type="text/javascript">

      function redirect(URL)

      {

      document.location=URL;

      return false;

      }

      </script>"

      Add "onclick" to your line of code that will display your website's URL in the browser. This line of code should appear as follows:

      "<a href="http://www.yourwebsite.com" onclick="return

      redirect('http://www.yourwebsite.com/?referrer=225');">Click here</a>"

      Replace "yourwebsite" with the name of your website.

Related Searches:

References

  • Photo Credit Hemera Technologies/AbleStock.com/Getty Images

Comments

Related Ads

Featured