Shared hosting htaccess problem Got this problem since last week i can only access the index page of my website
when i try to access the other pages it displays Whoops, looks like something went wrong. even i already change the debug to true. I have my htacess in my public folder
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
anything in the Laravel log files?
@Snapey
here is the last line in my error log
PHP Warning: file_get_contents(/home/privateusername/projectname/bootstrap/../.env): failed to open stream: No such file or directory in /home/privateusername/projectname/bootstrap/environment.php on line 15
so is that path correct for your .env file? Is .env present?
yes the environment.php is present in my bootstrap folder
Have you modified any directory paths? Default install?
i move out the public folder contents to public_html and the rest are inside project_folder
@bashy where can i send you a private message so i can give you the website project url? im not allowed to share it publicly.
regards
ciby
Well there's your reason I think. It's trying to look for the file in the wrong path. How did you modify the path? In the index.php file?
here's inside my index.php
require __DIR__.'/../projectname/bootstrap/autoload.php';
$app = require_once __DIR__.'/../projectname/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
@bashy am i missing something in my index.php?
here is how my folder structure right now
-> /
-->projectname
-->public_html
-->www
Not sure why you've done that but I can't help with customised directories. Try and use symlinks instead, far more dynamic and controllable.
yes the environment.php is present in my bootstrap folder
I was asking about the location of you .env file
Please sign in or create an account to participate in this conversation.