Answer the question
In order to leave comments, you need to log in
Path to public Laravel on server?
Project in laravel.
In local env everything works.
Transferred the project to the server, all links are incorrect, without the public directory: src="site.ru/assets/images/img.jpg"
The start page is set as site.ru/public/index.php echo public_path();
Displays the correct path www/.../site.ru/public/
Twig template engine, paths are set through: Tell me src="{{ asset('assets/images/logo.png') }}"
where fix?
Answer the question
In order to leave comments, you need to log in
Found a solution:
Redirect all requests to the piblic folder - create .htaccess at the root:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question