rewrite rules for apache 2 to use with angular js

The accepted answer to this question is outdated. You can now use the FallbackResource directive in your conf file with Apache 2.2.16+.

FallbackResource /app/index.html

If you want the FallbackResource directive to ignore the “/api” routes:

<Directory /api>
FallbackResource disabled
</Directory> 

Leave a Comment

tech