How to rewrite url in apache htaccess for angularjs app

前端 未结 2 1936
遇见更好的自我
遇见更好的自我 2021-01-22 13:05

The htaccess I\'m using is as follow

RewriteBase /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %         


        
2条回答
  •  太阳男子
    2021-01-22 13:53

    RewriteEngine   On
    RewriteBase     /
    RewriteCond     %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
    RewriteCond     %{REQUEST_FILENAME} !-f
    RewriteCond     %{REQUEST_FILENAME} !-d
    RewriteRule     ./index.html [L]
    

提交回复
热议问题