Angular2 without hash in the url

后端 未结 3 1692
春和景丽
春和景丽 2020-12-01 17:10

Now, my website\'s url looks like this because I\'m using the approach described here

http://localhost:4200/#/cadastro

Is it possible to remove the hash in t

3条回答
  •  渐次进展
    2020-12-01 17:38

    Create a .htaccess file Paste the following Code And Upload on your prod Server.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
    

提交回复
热议问题