Simple Steps to Remove Public from URL in Laravel

Sharad Jaiswal
Written by Sharad Jaiswal

Posted On: Apr 17, 2019

 

Here in this Laravel Example, we are going to see tested way to remove public from URL in Laravel.

Note: This example works on Laravel version 5 or above.

Steps:

  1. In your root directory of Laravel project, you find a file named,server.php rename this file from server.php to index.php.
  2. Now copy .htaccess file from your public directory and Paste it to the root directory.

That's it!

    Please Login or Register to leave a response.

    Related Articles

    Laravel Tutorials

    Laravel 5.5 Middleware complete Tutorial

    In Laravel, you can think middleware as a system or tool that are used to filter all HTTP requests entering your application. Middleware works between request and response of our application. It sits ..

    Laravel Tutorials

    Laravel Pagination Ajax

    Creating Ajax based pagination is Laravel 5.6. Ajax (Asynchronous JavaScript and XML) is a technique to update a specific part of webpage asynchronously without reloading the page. In this article, we..

    Laravel Tutorials

    Laravel Pagination

    According to Wikipedia Pagination is a process of separating or dividing a document or digital contents into discrete pages. In Core PHP and other frameworks, paginating record is a painful task. Lara..

    Ask a Question