Answers for "laravel project doesn't go into the public folder by itself"

0

laravel project doesn't go into the public folder by itself

For Laravel 5:
Rename server.php in your Laravel root folder to index.php
Copy the .htaccess file from /public directory to your Laravel root folder.
That's it!


But this will make your system vulnerable


------------------------------------
 all you need to do is to put this code into the .htaccess file in 
  public


RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
---------------------------------------
if it doesn't work just put a file namely index.html in root directory
and in side it put a script code 
like 
<script>
window.location.href = 'public/';
</script>
Posted by: Guest on May-02-2021

Code answers related to "laravel project doesn't go into the public folder by itself"

Browse Popular Code Answers by Language