3 回答

TA貢獻1856條經驗 獲得超5個贊
只需卸下底座從標簽的index.html就是這樣
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular App</title>
<base href="/">
Some more code
Don't do anything to this
刪除后,您的代碼將如下所示
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular App</title>
Some more code
Don't do anything to this

TA貢獻1842條經驗 獲得超21個贊
根據我們的討論,您說您尚未設置URL重寫規則。
根據用于承載應用程序的內容,您需要設置URL重寫規則。
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
NGinx:
try_files $uri $uri/ /index.html;
- 3 回答
- 0 關注
- 374 瀏覽
添加回答
舉報