StripOffStagingTags Function Makes Response.Redirect Workable in Staged Site (302068)
The information in this article applies to:
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 <HEAD> 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, "<NCOMPASSSTAGINGSERVER>")
If (tagstart <> 0) Then
str1 = Left(strUrl, tagstart - 1 ) + Right(strUrl, Len(strUrl) -
(tagstart - 1 + Len("<NCOMPASSSTAGINGSERVER>")))
tagstart = InStr(str1, "</NCOMPASSSTAGINGSERVER>")
If (tagstart <> 0) Then
str2 = Left(str1, tagstart - 1 ) + Right(str1, Len(str1) -
(tagstart - 1 + Len("</NCOMPASSSTAGINGSERVER>")))
StripOffStagingTags = str2
End If
Else
StripOffStagingTags = strUrl
End If
End Function
%>
Modification Type: | Major | Last Reviewed: | 11/12/2001 |
---|
Keywords: | kbDSupport kbprb KB302068 |
---|
|