Reputation: 125
I was wondering if it is possible to render a fully separated webpage at the root level, and keep the app structure without changing the original routing, also in root, so user would have:
https://mystartup.com -> (a separated and static html full website, own index.html and css,jss, etc... structure)
https://mystartup.com/login -> Ionic Login page
https://mystartup.com/home -> Ionic Home page
etc...
I could move the entire PWA structure to a subdirectory, but then, I "lose" an entire url level and miss simplicity in the address, like the following:
https://mystartup.com -> (a separated and static html full website, own index.html and css,jss, etc... structure)
https://mystartup.com/app/login -> Ionic Login page
https://mystartup.com/app/home -> Ionic Home page
etc...
How would you solve this address redirections to share the root level between an index.html and ionic index.html?
Thanks a lot
Upvotes: 0
Views: 353
Reputation: 9131
Angular is SPA. That means there will be one index.html file that will responsible to display other pages using client side scripting.
What you can try is to
rename index.html to index2.html which is generated by angular.
Rewrite Engine on server tobe ON. Check this https://httpd.apache.org/docs/current/mod/mod_rewrite.html
in your .htaccess you need add redirect rule that responsible for redirect to index2.html in case url not found. .htaccess will be on same level where you have index.html and index2.html(angular complete build)
RewriteRule ^ /index.html
Upvotes: 1