0

I'm trying to mask the URL for angular project. I could mask the URL for index.html. But if I'm trying to mask for a component, its throwing 404 error

I have tried writing Rewrite rule in Tomcat

RewriteCond %{REQUEST_URI} ^/(.)$ RewriteRule ^/(.)$ /folder1/home [NC,L]

If www.example.com is given in the browser, it should navigate to www.example.com/folder1/home. But throwing folder1/home is not found

1 Answers1

0

You should be doing this using Angular Router. You can define pathways and then lazy load components when the relative path is met.

https://angular.io/guide/router

Sam
  • 1,736
  • 8
  • 15