I generated a web version of my Ionic app using
ionic build --prod, and then copied the www folder content to a subfolder called “appt” under the root of my Apache WebServer.
The app does not work because all references are set to /, so they resolve to
http://myserver/ instead of
After googling a while, I found the switches
--base-href and -
-deploy-url, so now I am build the app using
ionic build --prod --service-worker --base-href /appt --deploy-url /appt but problem persist, and the
base tag remains as “/”.
The only workaround I’ve found is to manually edit the resulting index.html and manually adding the /appt part to all references, but obviously this is only a partial fix.
Am I missing something? For what I saw while googling, many people are facing this same problem.