Re: Redirect

by Thomas James Allen <tjallen(at)pipeline.com>

 Date:  Wed, 13 Oct 1999 02:50:04 -0400
 To:  "Erin LaFarge" <erin(at)clafarge.com>
 Cc:  hwg-basics(at)hwg.org
  todo: View Thread, Original
At 08:26 PM 10/11/99 -0500, you wrote:
>I'm trying to write a script that will redirect the user to a specific page
>based on the URL they requested.
>
>I have two domains pointed at the same space and want to redirect one URL to
>a page in a sub folder of my site.
>
>Thanks,
>Erin LaFarge
-----------------------

Erin,
Possibly something like this will do it:

<script language="javascript">
<!-- hide from browsers

var fred=location.href
if (fred=="full_url_of_file.html"){
	location.replace("go_here.html");
	}
	else{
	location.replace("go_there.html");
	}

//stop hiding-->
</script>

Hope this helps,
jimmy
---
Jimmy Allen (Thomas James Allen)
Business - Get Your Website Here
http://www.getyourwebsitehere.com
Personal - Eclecticity
http://www.getyourwebsitehere.com/personal

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA