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.

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.

  Remove “public/index.php” from URL in Laravel

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

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

Download Project Scripts

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

  No Access-Control-Allow-Origin header

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.   laravel where date between multiple columns
  2.   Create Google AdSense Account Help
  3.   Laravel 6 Join Clause Example Tutorial
  4.   PHP Star Triangle Nested using Foreach Loop
  5.   Check if the Uploaded File is an Image in Laravel 6
  6.   Clear All Cache From Laravel project 5.7
  7.   Laravel Logging an Array Example
  8.   Laravel Send Emails Mailgun setup Tutorial
  9.   Laravel GroupBy Error Solution 5.5 , 5.6, 5.7
  10.   Laravel Eloquent Replicate Table Row

Leave a Reply

Your email address will not be published. Required fields are marked *