0

I tried to deploy an agular app on tomcat 9, when i refresh index page work as expected but when refresh on deep-link i get blank page.

I put into webapps/mynameApp/WEB-INF/rewrite.config RewriteCond %{REQUEST_URI} !^.*\.(bmp|css|gif|htc|html?|ico|jpe?g|js|pdf|png|swf|txt|xml|svg|eot|woff|woff2|ttf|map)$ RewriteRule ^(.*)$ /index.html [L] and into context.xml <Valve className="org.apache.catalina.valves.rewrite.RewriteValve"/>

R. Richards
  • 24,603
  • 10
  • 64
  • 64

1 Answers1

0

By default angular is a static web, and wont refresh a deep link.

Try implementing this: https://angular.io/guide/router

This is a duplicate, but I cant mark it as one, yet. Angular 2: 404 error occur when I refresh through the browser

Here is the code.

Hope it helps.

Nenad Vichentikj
  • 111
  • 2
  • 10