2015-02-23 56 views
6

我已經將我的簡單php應用程序推送到Heroku,並獲得一些js文件的403狀態。Heroku 403禁止使用靜態js文件

https://guarded-forest-7267.herokuapp.com/vendor/jquery/dist/jquery.min.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/jquery-form/jquery.form.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/jquery-validate/dist/jquery.validate.min.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/jquery.inputmask/dist/inputmask/jquery.inputmask.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/modernizer/modernizr.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/jselector/src/jquery.jselector.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/rubber-carousel/dist/jquery.rubber-carousel.min.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/jmodal/src/jquery.jmodal.js Failed to load resource: the server responded with a status of 403 (Forbidden) https://guarded-forest-7267.herokuapp.com/vendor/scrollReveal.js/dist/scrollReveal.min.js Failed to load resource: the server responded with a status of 403 (Forbidden)

請告訴我這個問題,可以嗎?

+0

沒有任何人知道答案嗎?米麪臨同樣的問題 – LNT 2015-03-03 15:44:31

回答

0

它在.htaccess文件

是由於配置錯誤如果在.htaccess文件 有任何RewriteRule才添加這些RewriteCond

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

例如該代碼允許您將所有請求重定向除了靜態文件的index.php

Options +FollowSymLinks 
RewriteEngine On 
RewriteCond %{REQUEST_URI} !=/index.php 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* /index.php