0

i have 2 angular apps on the same directory (public_html) one is the main app which has its own routes. and the second is folder inside the main app which also have routes. i have a problem when i want to navigate to a route in the seconds app and when i try that the user returns to the main app.

is there a way to manage this? maybe with htaccess?

enter image description here

Or Shalmayev
  • 295
  • 1
  • 12

1 Answers1

0

the solution was to put in the second app htaccess with this content:

RewriteEngine On
# For existing assets or directories, no redirection is required
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# if the requested resource doesn't exist, use index.html
RewriteRule ^ ./index.html
RewriteRule ^(.*) /invited/index.html [NC,L]
Or Shalmayev
  • 295
  • 1
  • 12