2

Hiii guys,

my problem is the following:

At the beginning I just had one Angular-App, so I put it into the root folder of my Apache Server. My 404-Redirect on Apache to index.html was working fine.

Now i have two Angular-Apps with the following structure:


Root

--> App1 (has its own index.html)

--> App2 (has its own index.html)


If i know enter an invalid URL for App1 ( example.com/App1/invalidRoute/ ) my Apache Webserver is redirecting to the root folder.

In this case I want Apache to redirect to " example.com/App1/index.html ".

Thanks in advance

Adel
  • 88
  • 2
  • 11

1 Answers1

0

Take a look at this StackOverflow question: rewrite rules for apache 2 to use with angular js

The same applies with Angular, and you may need to set a matching basepath in your app if you are not using hash-urls.

jornare
  • 2,903
  • 19
  • 27