Replace a String within a URL:
Click here for an example.
Code:
Place in the <BODY>:
Highlight
<% strResult = "http://www.blah.com/blah1/blah2/blah3/blah4/replace/blah5" strResult2 = strResult NumSlashes = 7 str = "/" strPos = 1 for i = 1 to NumSlashes strNewPos = instr(strPos+1,strResult,str) if strNewpos = 0 then exit for else strpos = strnewpos end if next i = instrRev(strResult2, "/") If i > 0 then strResult2 = Mid(StrResult2, i) End If strResult = left(strresult,strpos) & "helloworld" & strResult2 response.write strResult %>