<%'nosuballowed 'This is the "auto-redirect." Please do not change! It redirects to the most recent 'article in the directory, eliminating the need to update this file. ' 'Instructions: ' ' 1. Do not change the includes or any of the ASP ' 2. To modify this for other auto-redirects, change the "GetLastFile" call, using ' the following parameters: ' 'GetLastFile(sYearDir, sPattern, sDatePattern, bDoFullYear) ' dim sYearDir'the RELATIVE path from where you "are" to where the archives reside. 'This will usually be the "current" year. ' dim sPattern'filename pattern, for example rulemaker*.htm. Always replace 'the location of the DatePattern with an asterisk character ("*"). ' dim sDatePattern'the date pattern, for example "yymmdd". ' dim sOtherURL'another URL where we can redirect if GetLastFile can't find the 'kind of file you are looking for. ' dim bDoFullYear'True/False: start from 12/31 (working backwards) or today's date? ' dim sNextURL'URL target for redirect, return value from GetLastFile function ' ' So for the Rulemaker.htm auto-redirect, where the archive files have names that look like ' rulemaker001231.htm, we would use a relative Dir of "2000", a ' Pattern of rulemaker*.htm, and a DatePattern of "yymmdd". If we can't find a match, we'll ' redirect to "/portfolios/index.htm". ' '------------------------------------------------------------------------- ' Make modifications here '------------------------------------------------------------------------- sYearDir = "2002" 'use the current year sPattern = "workshop*.htm" sDatePattern = "yymmdd" sOtherURL = "/portfolios/index.htm" '------------------------------------------------------------------------- 'Get the URL sNextURL = GetLastFile( sYearDir, sPattern, sDatePattern, False ) 'if we draw a blank, try again with the previous year if sNextURL = "" and isnumeric( sYearDir ) then sNextURL = GetLastFile( cint( sYearDir ) - 1, sPattern, sDatePattern, True ) end if 'blank sNextURL and numeric sYearDir 'nothing back, so log it and jump to the sOtherURL if sNextURL = "" then call LogError( "GetLastFile", "No File Found for pattern " & sPattern, "", false, false, "", "", "" ) Response.Redirect sOtherURL else 'nonblank sNextURL, so go there response.redirect replace( sNextURL,"\","/" ) end if 'sNextURL = "" %>