Laravel Redirect To Another URL / Web Page - HTTP Laravel Redirects

Laravel Remove Public From URL Steps

Today, We want to share with you Laravel Remove Public From URL Steps.In this post we will show you Remove “public” in URL in Laravel 5.7 Step By Step, hear for Laravel 5.7 – Remove Public from URL using htaccess we will give you demo and example for implement.In this post, we will learn about How to Remove Public Directory in Laravel 5.5, 5.6, 5.7 with an example.

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

Laravel Remove Public From URL Steps

There are the Following The simple About Laravel Remove Public From URL Steps Full Information With Example and source code.

As I will cover this Post with live Working example to develop how to remove public from url in laravel on server,, so the some laravel 5.7 remove public from url for this example is following below.

Step 1: Rename File

Laravel’s .htaccess to remove “public” from URL

simple change your server.php file in the root file to index.php

//in your Laravel root folder to 

Step 2: Update .htaccess

Simple Your .htaccess file and put it laravel Main root folder

Options -MultiViews -Indexes

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Laravel Controller...
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC]

Laravel 5.* Project- Remove public from URL

Move Laravel Project From localhost to live production server : More Easy MethodsRemoving PUBLIC from URL in Laravel

require __DIR__.'/../bootstrap/autoload.php';
require __DIR__.'/../laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$app = require_once __DIR__.'/../laravel/bootstrap/app.php';

Note : And Last You remove all cache and cookies.

Angular 6 CRUD Operations Application Tutorials

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel Remove Public From URL Steps.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related FAQ

Here are some more FAQ related to this Article:

  1.   Dynemically HTML table from AJAX response using PHP
  2.   Laravel Collection Push Example
  3.   Clear All Cache From Laravel project 5.7
  4.   Laravel 6 Display Message box
  5.   Laravel 6 Remove public from URL
  6.   Laravel Send Emails Mailgun setup Tutorial
  7.   Laravel 5.7 Bootstrap Admin Panel Templates Integrate
  8.   Laravel resource route multiple parameters Example
  9.   Laravel Calculate multiple totals in conditional aggregates
  10.   Laravel 5.6 PDF Generation using Dompdf Example