Hi Heather,
You can try using a rewrite profile for this to change the URI on the back-end without changing the URI in the client's web browser
tmsh create ltm profile rewrite REWRITE rewrite-mode uri-translation uri-rules add { mysite.com { type request client { scheme http host mysite.com path /code/ } server { path /newdir/code/ } } }
tmsh modify ltm virtual profiles add { REWRITE }
Note: You will need to make sure that there is an HTTP profile applied to the virtual server
Let me know if this works for you