Redirect Scripts HELP!

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

motofabio

Thread Starter
Joined
Apr 29, 2003
Messages
47
Hello. I was told by my hosting company that they cannot redirect multiple URLS to subfolders on my shared server. But that the same effect could be achieved by using a redirect script in the header of my index page. Of course, they couldn't give me an example of that.

Does anyone know what the code is or know of a index.htm that I can view the source on to see it?

Thanks in advance,

fabio
 
Joined
Mar 28, 2004
Messages
51
A meta tag in between the <head> and </head> tags would work:

<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://yoursite.com/subfolder/index.html">

The number 0 is how many seconds it waits before refreshing; this would refresh instantly, or you could set it to 1, 2, etc. seconds.

The other method is JavaScript. Change the <body> tag to:

<body onLoad="redirect();">

Then, put the following in the head section:

<script language="JavaScript">
function redirect()
{
window.location.href = "http://yoursite.com/subfolder/index.html";
}
</script>


Either method would work.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top