Apache rewrite rules not being applied for angularjs

This is now much easier in Apache 2.2.16+ using the FallbackResource directive.

FallbackResource /app/index.html

http://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource

Depending on how you’re forwarding access to your API you may need to also leverage the enclosure to disable the fallback resource on specifically on API requests (2.2.24+).

<Directory /api>
    FallbackResource disabled
</Directory> 

Leave a Comment