Closed meko3 closed 5 months ago
Hi, I want to use flightPHP on Heroku. But I got 403 Error on Heroku. on Local server, this code went well.
Is This problem because of my code or because of Heroku server?
Here is code.
Procfile
web: vendor/bin/heroku-php-apache2 src/
.htaccess
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L]
<?php require 'vendor/autoload.php'; Flight::set("layout", "templates/Layout"); Flight::route("/", function() { Flight::render("templates/head", array("style" => "front"), "head_content"); Flight::render("templates/header", null, "header_content"); Flight::render("pages/front", null, "body_content"); Flight::render("templates/footer", null, "footer_content"); Flight::render(Flight::get("layout")); }); Flight::start();
Structure
.git src |-views |-templates |-.htaccess |-Index.PHP .gitignore composer.json composer.lock Procfile
Did you try uploading and viewing an image or another simple file on that server?
A 403 is possibly that the server or apache config isn't allowing external requests.
@meko3 still actual?
Hi, I want to use flightPHP on Heroku. But I got 403 Error on Heroku. on Local server, this code went well.
Is This problem because of my code or because of Heroku server?
Here is code.
Procfile
.htaccess
Structure