Answer the question
In order to leave comments, you need to log in
How to make routing work in laravel 5?
Hello!
I spent the whole day tormenting myself with the installation of Laravel 5. I could not solve the problem.
Installing Laravel:
composer create-project laravel/laravel --prefer-dist
You don't have permission to access /laravel/ on this server.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Route::get('/', '[email protected]');
<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>
Answer the question
In order to leave comments, you need to log in
Want to try Laravel? Make it a virtual domain and don't suffer. In the folder ( localhost/laravel ) it does not work out of the box, it is not easy to force, the result will be unsecured.
Take away.
Options -MultiViews
On the storage folder and nested give write permissions to everyone who executes the code. Well, or 777 if only a test.
Well, /laravel is far from /. Either write a normal DOCUMENT_ROOT to the /public folder, or suffer with RewriteBase and what might come up with the paths.
If the installation is composer create-project laravel/laravel
then you need to go to laravel/public
I also do not understand what the salt is here. I have openserver. If you put it in the localhost / blog folder, suppose it will be installed, but it will work crookedly, I've been spinning .htacess all day. But if you put it as a virtual domain, it works. NICE.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question