PathLocationStrategy works only locally

前端 未结 3 440
你的背包
你的背包 2020-12-19 13:23

I have problem with hash, on my working project when I build it, on test project all work correctly. I already read this questions in google: Angular2 without hash in the ur

3条回答
  •  無奈伤痛
    2020-12-19 14:04

    You was right, my problem was with hosting https://www.beget.com/ru, I found this solution https://geekbrains.ru/topics/3055 and i should add in my file .htaccess this code:

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

    And now it work. Thanks for your help !

提交回复
热议问题