PDA

View Full Version : The best way to REDIRECT from index.htm ?


rjay
04-13-2005, 11:11 AM
Our site is written in ASP and the home page is inside a two-deep folder structure. I need to redirect visitors from index.htm to this page. I was previously using a PHP redirect but after repeated PHP outages on my server, I changed to the code below. I now find that our Pagerank has dropped from 4 to 0 (possibly a coincidence and unrelated). SO, what is the most search-engine friendly way of redirecting ?


<html>

<head>
<title>The Music Broker Network</title>
<noscript>
<meta http-equiv="refresh" content="2; URL=http://www.themusicbroker.net/comersus/store/comersus_dynamicIndex.asp">
</noscript>
<script language="JavaScript">
<!--
var sTargetURL = "http://www.themusicbroker.net/comersus/store/comersus_dynamicIndex.asp";

function doRedirect()
{
setTimeout( "window.location.href = sTargetURL", 2*1000 );
}

//-->
</script>

<script language="JavaScript1.1">
<!--
function doRedirect()
{
window.location.replace( sTargetURL );
}

doRedirect();

//-->
</script>

</head>

<body onload="doRedirect()">

<p><a href="http://www.themusicbroker.net/comersus/store/comersus_dynamicIndex.asp">We take our members music to A&R and help them get a Record Deal, Publishing Deal
and Film or TV placement.</a></p>

</body>

</html>

JasonD
04-13-2005, 11:32 AM
As you are running the site in ASP I will presume you are using IIS, which I know absolutely nothing about.

If it were Apache though I'd suggest changing the document root to comersus/store/comersus_dynamicIndex.asp in httpd.conf

or add an .htaccess file the following in it.


DirectoryIndex comersus/store/comersus_dynamicIndex.asp


I'm sure similar is possible using IIS, and I am also pretty sure someone with more knowledge than me will pop up in a bit with the answer :D

adamjthompson
06-06-2005, 07:20 PM
I don't believe that the drop was a coincedence. If you use a meta-refresh, you have to set it to 30 seconds or more, or the SE's consider it spam.

Adam