- I have a second domain on my shared hosting account.
- My laravel project is in the root dir
- The laravel public folder is under public_html. public_html/public
Note: I don't want the public files directly under public_html because I have other files that would be overwritten.
I've already changed these to lines in my index.php file.
require DIR.'/../../MyOtherDomain.com/vendor/autoload.php';
$app = require_once DIR.'/../../MyOtherDomain.com/bootstrap/app.php';
The question is how do i point the laravel project to use the index.php file under public_html/public?
Thanks in advance.
public_html/public
this is not actually how it sounds, you just need to copy all files from public folder to public_html, you don't create public folder in public_html, public folder is public_html on server, Now just keep css, js and fonts and front-end files into public folder and if you are uploading any image or document (i'm assuming uploaded files are going to be overwritten ) keep these into storage folder which is already in the root, this way you can keep all files safe.My question is do you want css and others front-end files to be overwritten too ? – Vipertecpro