0

i have developed a project with default directory structure.

But on production, i don't want public in URL.

What can be done.?

I tried changing the app path, but still not working.

  • 1
    check these : https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url – Meera Tank Aug 31 '17 at 10:27
  • What About vulnerabilites.? whatchout as this may be unsafe, make sure no one can't request your .env file if you're doing this unless you're ok with people viewing your database password in clear text ;) – GabLeRoux Mar 7 '15 at 3:35 23 This wouldn't work if you are referencing your assets using the relative path from root ie. "/assets/styles.css" and so on. I am still struggling with finding best way to deploy it over servers – Ghazanfar Mir Mar 17 '15 at 12:53 – Nitin Srivastava Aug 31 '17 at 10:41
  • Possible duplicate of [Laravel 5 - Remove public from URL](https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url) – Troyer Aug 31 '17 at 11:16

1 Answers1

0

Just copy index.php and .htaccess file from public directory and paste it in project root folter.

Then change bootstrap path in project root folder index.php file like below,

require __DIR__.'/bootstrap/autoload.php';

and

$app = require_once __DIR__.'/bootstrap/app.php';
Mansoor H
  • 594
  • 1
  • 8
  • 25