> --- tony wrote: > > I need some javavscript or ASP code that simply allows me to > > redirect someone who visits my homepage, to a number of sequential > > ASP files. > > ie - when someone arrives at my homepage (default.asp) page they > > are immediately redirected to default1.asp.And then the next viewer > > that comes to my default.asp homepage - is immediately sent to > > default2.asp. And so on and so on. > > I can't imagine, in the name of all that is usable, why you want to > do this. But I'm sure you can explain. > > > This also means that if someone comes to my homepage - looks around > > the site > > and at some point returns to the homepage - he/she also sees a new > > homepage. > > You'd have to write a cookie at least then, to know if the user came > back and hit the page. Why would you need a cookie? The numerical value of the current version of default.asp is in application scope. You would only need a cookie if you wanted a user to see the same version of default.asp that they saw initially, or definitely *not* see the same version of default.asp that they saw initially. This was not the impression I formed from the original post. > > As as aside - is there any problem associated with having a script > > similar to the above on my homepage and Search Engine Robots - I > > thought I may have read somewhere in the distant haze that using > > redirects on a homepage may be asking for trouble. > > You're asking for trouble. It depends on what kind of redirect too. A > 301 (permanent) is better than a 302. At my job here, we do redirects > on our major ecom site and it totally borks our ratings with google. > We have a real good search engine company retained helping us out > with a new site and the guy couldn't stress enough how bad this was > for our rankings. Yes and no. AFAIK, Server.Transfer will use the same instance of the Response object; so the redirect process would be transparent to search engines. This only just occurred to me just now, so if I'm wrong could someone correct me? > Maybe if you could elaborate on why you want to do such homepage > gymnastics, a solution can be suggested. I'm not sure what code to > even suggest as I'm unclear on what you are really trying to do. It doesn't seem too tricky to me; although I may have misunderstood the request. How about the following? <% Dim g_siDefault If Application("whichPage") = "" Then Application("whichPage") = 1 Application.Lock g_siDefault = Application("whichPage") Application("whichPage") = Application("whichPage") + 1 If Application("whichPage") = 8 Then Application("whichPage") = 1 Application.Unlock Server.Transfer "default" & g_siDefault & ".asp" %> Regards Chris Marsh