Answer the question
In order to leave comments, you need to log in
Why does it say page not found?
Tell. The situation is the following. Installed laravel. Everything opens at the url www/public/. I wanted to remove public from url. Found a solution with htaccess:
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
Answer the question
In order to leave comments, you need to log in
virtual host make yourself and norms
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/laravel/public"
ServerName laravel.dev
ServerAlias www.laravel.dev
<Directory "c:/xampp/htdocs/laravel/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
127.0.0.1 laravel.dev
127.0.0.1 www.laravel.dev
There is no such solution that it would be possible to download a site from a repo in two seconds and it worked. You will always need to raise and configure the server, and often the same thing is repeated, and nothing can be done about it. stunoff's answer is correct. You NEED to use virtual hosts, that's the point. Another option is to use .htaccess, but this is not quite the right solution, rather a temporary one. It is difficult to explain why, but it is necessary. It's the same way you set a password on MySQL even though it's only available locally. It is better to have extra security measures than to rely on one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question