Skip to Content
0
Aug 16, 2019 at 08:26 AM

SCP UI5 build - change build path or safely redirect

196 Views Last edit May 21, 2020 at 03:16 PM 2 rev

Hi,

I have an old UI5 project that was developed without any build scripts, so just a simple website format that's published with /webapp/index.html.

I'm trying to wrap it into a proper build project, to leverage component-preload and cachebuster, however, I tried to tweak the yaml and other build files to generate the same output as it's currently there ("/webapp/index.html"), but it doesn't respect that and always generates in the "dist" folder "/index.html" and readjust any "webapp" reference in neo-app/manifest.json as well.

Problem I have with this new path is that the website already has everything pointing to the current path, and after some research, any HTML/JS redirect from "webapp/index" to "index" for instance would mess up the SEO/Analytics, because for instance it removes the referrer, and the only way to preserve it would be to wrap it into a backend language or use server-side redirect (301/htaccess).

Is there any way to generate the built UI5 into that original path (or any path for that matter) other than the "/index.html"? Or is there a way to configure something in SCP console to create the safe 301 redirect?

Thanks.