It doesn't look to me like he's trying to encrypt the full URL including the domain:
<cfset encryptedUURL ="http://localhost/1/2/inventory/index.cfm?encrypt(theURL, '123','CFMX_COMPAT','UU')">
I think the code in the question is just missing the # # around the encrypted part, probably due to how it's been put into the question rather than the actual code being used:
<cfset encryptedUURL ="http://localhost/1/2/inventory/index.cfm?#encrypt(theURL, '123','CFMX_COMPAT','UU')#">
I think Ferguson's answer is probably more on the money.