Cyclical redirection at the start laravel 5 project
Ad
Cyclical redirection when you start laravel 5 / public
?
I checked all the way app.php / autoload.php
It's all right.
Appears before being routed.
I checked and left cleaned Roth.
The logs are empty.
serenity / public / public / public / public / public / public / public / public / public /
That such a plan error. Where to dig, dear?
I add that site running through htpps, not http.
I've heard there is some ports may be employed.
There are suspected server.php And Apache. Here is the code
Apach
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Server.php
<?php
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
What could be the problem?
Ad
Answer
Ad
Your document root needs to point to the public directory not the project root directory. This is so that index.php is loaded directly. For apache, server.php is not used, that is for when you run artisan serve.
Ad
source: stackoverflow.com
Related Questions
Ad
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
Ad