Hi If I understand correctly you are redirecting to some alfresco webscript on creation of site.
Below constant is available in Share client side js,
To call any alfresco data webscript, Please use
Alfresco.constants.PROXY_URI which refers window.location.protocol + "//" + window.location.host + "/share/proxy/alfresco/";
Ex: Alfresco.constants.PROXY_URI + "api/node/" + nodeRef + "/formprocessor" [Your custom or OOB script URL]
Hope it helps!