当我刷新页面时,发现错误404-页面。
索引文件
<base href="/Rushi/sandwichesuk/"/>
App.js
$locationProvider.html5Mode(true);
$routeProvider
.when('/index1', {
templateUrl: 'assets/views/index1.html',
controller: 'index1Controller'
})
这是我的.htaccess文件
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow html5 state links
RewriteRule ^ Rushi/sandwichesuk/index.html [L]
错误:
答案 0 :(得分:0)
我解决了我的问题
引用https://lancelhoff.com/enabling-htaccess-in-apache-on-windows/
并更改.htaccess文件
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /Rushi/sandwichesuk/index.html