
mmuthigani
Published on 05/30/2024
05/05/2023 (2 years ago)
Remove public from url in Laravel: In this tutorial, we will learn how to remove the public path from URL in laravel 10, 9, 8, and 7 apps using .htaccess and server.php file.
There are two ways to remove the public\index.php path from URL in laravel 7, 8, 9, 10 apps; is as follows:
To create and update the .htaccess file in the Laravel. You can find .htaccess file in root directory.
You must have mod_rewrite enable on your Apache server. The rewrite module is required to apply these settings. You also have enabled .htaccess in Apache virtual host for Laravel.
Update the code into your .htaccess file:
1 2 3 4 | <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule> |
Follow the below steps for remove public from url in laravel
mmuthigani
Published on 05/30/2024
mmuthigani
Published on 02/10/2024
mmuthigani
Published on 01/12/2024