Microsoft KB Archive/302068

= StripOffStagingTags Function Makes Response.Redirect Workable in Staged Site =

Article ID: 302068

Article Last Modified on 11/12/2001

-

APPLIES TO


 * NCompass Resolution 4.0

-



This article was previously published under Q302068



SYMPTOMS
On a Microsoft Windows NT 4.0-, a Microsoft Windows 2000 Server, or a Microsoft Windows 2000 Advanced Server-based computer, Response.Redirect does not work when staging a site. The function works fine in a dynamic site, but the URL becomes unreadable once the site is staged.



RESOLUTION
Include the StripOffStagingTags function in the  section of your template or Include file. Instead of using Response.Redirect(Posting.url), use Response.Redirect(StripOffStagingTags(posting.url)).

For an example of how to do so, see the following script: <% Function StripOffStagingTags(strUrl) Dim tagstart Dim str1 Dim str2 tagstart = InStr(strUrl, &quot;&quot;) If (tagstart <> 0) Then str1 = Left(strUrl, tagstart - 1 ) + Right(strUrl, Len(strUrl) - (tagstart - 1 + Len(&quot;&quot;))) tagstart = InStr(str1, &quot;&quot;) If (tagstart <> 0) Then str2 = Left(str1, tagstart - 1 ) + Right(str1, Len(str1) - (tagstart - 1 + Len(&quot;&quot;))) StripOffStagingTags = str2 End If Else StripOffStagingTags = strUrl End If End Function %>

Keywords: kbprb KB302068

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.