Refreshing page gives “Page not found”

后端 未结 7 2215
夕颜
夕颜 2020-11-29 02:08

I have an app where it uses a single ng-view and multiple controllers and views. If I navigate through the root, eg: www.domain.com, everything works. Except that if I hit

7条回答
  •  余生分开走
    2020-11-29 02:36

    As of March 2018, Just add these below lines in your .htaccess file.

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.front-end*)$ /front-end [NC,L,QSA]
    RewriteRule ^(.*)$ /index.html [NC,L,QSA]  
    

    Hope this will be helpful for you.

提交回复
热议问题