title: Get 404 when refresh page after using PathLocationStrategy in Angular 7
body: <p>We use angular 7 + node 8.11.4, previously, we use <code>HashLocationStrategy</code> and all routes worked, while, as you know, '#' will auto added in URL as Hash flag, now we want to remove '#',  so i use <code>PathLocationStrategy</code> instead Hash*. While after changing, when i refresh page, i will get 404 page and it also occur when visit redirect pages, that's my question.</p>
  
  <p>I have searched and known that after changing to <code>PathLocationStrategy</code>, all router need to redirect to index.html(default home page), while i'm not sure how to implement it in node environment(most is apache, nginx,tomcat)</p>
  
  <p>See my below code:</p>
  
  <p><strong>app.module.ts</strong>: </p>
  
  <pre><code>providers: [{ provide: LocationStrategy, useClass: PathLocationStrategy }, LookupPsmService, ComponentMapping,
      {
        provide: HTTP_INTERCEPTORS,
        useClass: PsmHttpInterceptor,
        multi: true
      }, CookieService, AuthGuard],
    bootstrap: [AppComponent]
  })
  export class AppModule {CKEditorModule}
  </code></pre>
  
  <p><strong>index.html</strong>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;base href="/"&gt;
  </code></pre>
  
  <p><strong>AppRoutingModule</strong>:</p>
  
  <pre><code>@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
  })
  export class AppRoutingModule {
  }
  </code></pre>
  
  <p>My expected results is remove '#' in URL and can refresh in browser.</p>