Are you sure the index.blade.php file exists is /resources/views/home/ ?
laravel 9 shared hosting error
I uploaded my project to my hosting.I did a database transfer.I created my htaccess file.
RewriteEngine On RewriteRule ^(.*)$ public/$1 [L]I get this error
View [home.index] not found.
this document path resources>views>home>index.blade.php
how i can solve?
@Tray2 yes. ı sure. https ://img yukle. com/i/nUKIrU
@Tray2 please help me
@urwxgrwx I gave up guessing that image url :) How is the structure of your folders? Is there a public_html folder?
@Sinnbeck yes ı have public_html :) it wouldn't let me link just because i'm a new sign up :(. I was trying to show that I have index.blade.php
@urwxgrwx Try this, it will simulate that your document root is public.
#Rewrite everything to subfolder
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public
Rewriterule ^(.*)$ public/ [L]
@Tray2 I've tried.same error. public_html>.htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public
Rewriterule ^(.*)$ public/ [L]
public_html>public
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
public_html>public>index.php
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
if (file_exists($maintenance = DIR.'/../storage/framework/maintenance.php')) { require $maintenance; }
require DIR.'/../vendor/autoload.php';
$app = require_once DIR.'/../bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = $kernel->handle( $request = Request::capture() )->send();
$kernel->terminate($request, $response);
@urwxgrwx Are you sure that they use Apache and not nginx?
@urwxgrwx No need to show the index as we assume you havent changed it. Never change laravels base files
@Tray2 ı guess use litespeed. is there a difference?
@urwxgrwx Of course there is a difference, LiteSpeed is not Apache. While LiteSpeed supports htaccess files it's not the same. I suggest switching to apache or nginx since they are more widely supported.
https://blog.litespeedtech.com/2017/07/26/wpw-rewrite-rules-in-the-proper-order/
Please or to participate in this conversation.