Angular route with html5Mode giving 'Not found' page after reload

后端 未结 2 1342
不思量自难忘°
不思量自难忘° 2020-12-30 16:50

I made some Angular routes as shown in the code bellow.

app.config(function($routeProvider, $locationProvider, $provide) {
    $routeProvider
    .when(\'/\'         


        
2条回答
  •  有刺的猬
    2020-12-30 17:08

    #BEGIN
    

    Options +FollowSymLinks

    
        RewriteEngine on
    
        # Don't rewrite files or directories
         RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} -s [OR]
       RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
    
       RewriteRule ^(.*) your root folder/index.php [NC,L]
    
     
       #END
    

    its working 100% also add to your index.html code in section

提交回复
热议问题