Dick Smith Library, Room 248
Office: 254.968.9713
Fax: 254.968.9467
www@tarleton.edu
ServicesWeb Account Set-Up
bars

Re-Direct Code

Has your web site location changed but you still want to keep your original URL? This can be done by using some Javascript code to re-direct the user from the URL that they entered to the actual location that the site is located. Copy and paste this code into your index.htm file that is stored at the location of the original site (the one that has the URL that will be used). The first part goes inside the <head> tags, and you just need to change the URL to the one you are re-directing to:

<SCRIPT LANGUAGE="JavaScript"><!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
window.location="http://www.yourwebsite.com";
// -->
</script>

The second part goes inside the <body> tags, and just change the URL that you are re-directing to:

<noscript>
If you are not redirected automatically, <a href="http://www.yourwebsite.com">Click here to proceed to the website</a>.
</noscript>

Script provided courtesy of Web Source.

 

   
Web Services - Tarleton State University