reinstate mirror markup
diff --git a/releng.wtpbuilder/distribution/wtp.site/build.xml b/releng.wtpbuilder/distribution/wtp.site/build.xml
index bd6417e..b34d357 100644
--- a/releng.wtpbuilder/distribution/wtp.site/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/build.xml
@@ -55,7 +55,7 @@
 
         <property name="indexFileName" value="index.php" />
         <property name="result" value="${buildDirectory}/${buildLabel}" />
-        <property name="indexTemplateFilename" value="index.html.template" />
+        <property name="indexTemplateFilename" value="index.html.template.php" />
 		
     	<copy file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}" tofile="${buildDirectory}/${indexFileName}" />
     	
diff --git a/releng.wtpbuilder/distribution/wtp.site/publish.xml b/releng.wtpbuilder/distribution/wtp.site/publish.xml
index 935e595..153f608 100644
--- a/releng.wtpbuilder/distribution/wtp.site/publish.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/publish.xml
@@ -228,6 +228,10 @@
                  token="@mirror@"
                  value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" />
 
+      <replace file="${resultingIndex}"
+               token="@buildBranch@"
+               value="${buildBranch}" />
+
         <!--  Insert PreRequsites  -->
 
         <replace file="${resultingIndex}"
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
similarity index 97%
rename from releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template
rename to releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
index e6ef22b..05f3173 100644
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
@@ -9,9 +9,16 @@
 //ini_set("display_errors", "true");
 //error_reporting (E_ALL);
 
-//todo: compute downloadprefix based on host server, and stage of declaration
+$mirrorScript="";
 $downloadprefix="./";
 
+// use mirrors if and only if on eclipse.org servers
+$serverName = $_SERVER["SERVER_NAME"];
+if (stristr($serverName, "eclipse.org") ) {
+     $mirrorScript="http://www.eclipse.org/downloads/download.php?file=/"; 
+     $downloadprefix="${mirrorScript}webtools/downloads/drops/@buildbranch@/@build@/";
+}
+
 // todo: unsure if can handle filenames that are URLs?
 function fileSizeInMegs($filename) {
     // handy constant to compute file size in megabytes