1 Creat Iscript function,you can take advantage the follow code.
Declare Function SpecifyPortalOpen PeopleCode FUNCLIB_PTPP.PTPP_PORTALR FieldFormula;
Function IScript_ContentRedirect()
Local ApiObject &portal;
Local ApiObject &cref;
Local string &url = "";
Local string &portalName = %Request.GetParameter("PORTAL");
Local string &crefName = %Request.GetParameter("CREF");
&portal = SpecifyPortalOpen(&portalName);
&cref = &portal.FindCREFByName(&crefName);
If (&cref <> Null) Then
If (&cref.Authorized) Then
&url = &cref.AbsoluteContentURL;
End-If;
End-If;
%Response.RedirectURL(&url);
End-Function;
2 Create a new CREF for the iScript. In the additional parameters section of the CREF, addPORTAL=EMPLOYEE&CREF=YOUR_CREF_NAME
3 Create a CREF for your external URL
4Update the new iScript CREF's security to match the external content CREF's security.