Administrators Nathan Posted March 24, 2018 Administrators Share Posted March 24, 2018 In Laravel the path for serving your web page is in the /public folder. By default after installing Laravel and navigating in a browser to the URL you will see a directory listing of all the Laravel files. Here’s an easy way using an .htaccess file to redirect requests to the Laravel /public folder user mod_rewrite. Create a .htaccess file in your root directory and add the following code. RewriteEngine on RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] Save your file and refresh your browser, you should now see the default Laravel splash page. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.