Hello @koko ,
Thanks for reaching out.
In such scenarios, recommend to publish the application using the highest level path so that remaining path would be translated by default. In this example, it would be http://aaa/
For example, if you publish the path https://yourapp/
and when end user calls images in https://yourapp/media
, they would be rendered by default therefore you don't have to publish complete path https://yourapp/media
to work. Hope this helps.
------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.