Refreshing page gives “Page not found”

后端 未结 7 2200
夕颜
夕颜 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:28

        
          RewriteEngine On
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteCond %{REQUEST_URI} !index
          RewriteCond %{REQUEST_URI} !.*\.(css  js|html|png)
          RewriteRule (.*) index.html [L]
        
    

    use this as .htaccess

提交回复
热议问题