gsr
04/08/2023, 3:41 PM<cfset request.thisUrl = getPageContext().getRequest().GetRequestUrl().toString()>
<cfset request.websitePath = left(request.thisUrl, len(request.thisUrl) - len(listLast(request.thisUrl,'/')))>
<cfset request.jsFolder = request.websitePath>
http://localhost:9001/website1/project1/admin/ - this path is the request.websitePath admin Section
http://localhost:9001/website1/project1/admin/admin-home.cfm - this is request.thisUrl
i am going to go into JS directory like this, how should i get in there
http://localhost:9001/website1/jsAdam Cameron
Adam Cameron
x, I wouldn't start from `y`".Adam Cameron
commonPart, baseAdminPart and requestSpecificAdminPart. Only baseAdminPart and jsPart are known ( /project1/admin and /js respectively), the others need to be inferred from the whole URL. And from that you want to derive a URL made from commonPart, jsPart?Adam Cameron
<http://localhost:9001>)? Those are all always (?) available in various CGI variables. Do you know even know website1? This value doesn't exist anywhere other than in the current URL you need to fetch from the PageContext?Adam Cameron
website1 isn't in some websiteName variable or something, is it not simply the first segment of CGI.script_name?