Pra*_*era 6 javascript apache .htaccess http-status-code-404 ember.js
我有一个使用Ember-App-Kit(EAK)提供的入门套件的小型余烬应用程序.我在构建生产AWS EC2实例后上传了dist目录.
我现在面临的问题::
首先我认为这是由于权限错误,但它只是单个html文件,js和css正在加载正确.然后想到可能是htaccess问题所以试图插入一个,但之后也没有效果.应用程序源代码的条带化版本驻留在源代码中
用于重定向的.htaccess文件::
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule ^(.*)$ /index.html [L]
Run Code Online (Sandbox Code Playgroud)
实际上我不知道如何使用 Apache 服务器来做到这一点,所以我安装了 nginx,它使用我在配置文件中提供的重写规则。
server {
root /var/www/{Your App Directory Path Here};
index index.html index.htm;
server_name {Your website URL or IP address here};
location / {
try_files $uri $uri/ /index.html?/$request_uri;
}
}
Run Code Online (Sandbox Code Playgroud)
您可以在这里找到更多讨论:Ember-App-Kit Git Repo Issue 486
| 归档时间: |
|
| 查看次数: |
2053 次 |
| 最近记录: |