[thelist] redirecting server side
Robert Goodyear
rob_goodyear at yahoo.com
Thu Aug 9 15:48:44 CDT 2001
Since you've emptied the working DIR, maybe you could build a custom 404 page in ASP or
your favorite scripting language that redirects the asset request to the root.
No guarantees at ALL, but a 404 errordoc that's something like this MIGHT work. Then
change your 404 doc in your server to point to this 404.asp.
**CAUTION** You'd have to test correctly to make sure you don't get an endless loop for a
true 404 type response.
<%
strQueryString = LCase(Request.ServerVariables("Query_String"))
strRequestedURL = replace(strQueryString, "404;", "")
URL = replace(strRequestedURL, "http://www.applebycolorlab.com/_working1/" , "")
Response.Redirect(("http://www.applebycolorlab.com/" & URL))
%>
Hope that helps.
/rg
--- Rob Oviatt <rgoviatt at nbnet.nb.ca> wrote:
> I goofed!!
>
> This afternoon I sent out my company's newsletter and forgot to change the
> <base href> I put in the document to point to the live version of our
> site. It is pointing to the working version. We've reissued the
> newsletter with a brief explanation, apology, and emptied the working
> directory. But I'm curious if there is a way of redirecting the requests
> to our working directory to the live site.
>
> Both the live and working version are run in parallel directories located
> in the wwwroot folder. The working version is mapped to be a subdirectory
> of the live site. Meaning the live site is accessed using
> http://www.applebycolorlab.com/ and the working is accessed using
> http://www.applebycolorlab.com/_working1/ . ( I didn't setup the server
> this way, but have learned to live with it)
>
> We're running IIS 4 on NT4 with SP6
>
> Thanks
>
> Rob Oviatt
>
> Web Developer / Typesetter
> Appleby Color Lab
> phone: (506) 459-2320
> email: applebyweb at nb.aibn.com
> web site: http://www.applebycolorlab.com/
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
More information about the thelist
mailing list