2015-02-23 12 views
6

Przesyłam moją prostą aplikację php do Heroku i otrzymuję status 403 dla niektórych plików js.Heroku 403 Zabroniony dla statycznych plików 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)

Co może być problemem?

+0

czy ktoś zna odpowiedź? m stoi przed tym samym problemem – LNT

Odpowiedz

0

To było spowodowane błędną konfigurację w pliku .htaccess

Jeśli w pliku .htaccess istnieją RewriteRule dodać te RewriteCond przed nim.

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

Na przykład kod ten pozwala przekierować wszystkie żądania z wyjątkiem plików statycznych do index.php

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