Don't upload any files other than .htaccess and index.php to your public dir?
The only directory that should really be accessible via the web is public
elite123 could you give the steps to achieve this?
I guess, you don't want users to see the app, bootstrap or vendor folders.
That is the whole purpose of the public folder. You must point your browser directly to your public folder. All css and javascript goes into that folder
When you want to deploy your app, let's say you are using the domain foo.bar, you will configure your web server in order to directly serve the public folder.
It depends on the server configuration, but on a cpanel server, you would upload the "public" directory to "public_html" and everything else to a directory in your home directory:
/myapp
/app
/bootstrap
/vendor
/public_html <- this is your "public" directory
index.php
.htaccess
In this scenario you have changed where the "app" directory is relative to "index.php" so you need to update the two paths in "index.php" to point to the "myapp" directory:
...
require __DIR__.'/../myapp/bootstrap/autoload.php';
...
$app = require_once __DIR__.'/../myapp/bootstrap/start.php';
...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community