Please calm down. Rage has never helped anybody.
Since you write about the public_html
folder I assume you have access to the folder that contains the public_html
folder? If so:
app
folder is next to the public_html
folder)public
to public_html
(be sure to also move hidden files, such as .htaccess
!)public
folderbootstrap/path.php
change'public' => DIR.'/../public', to
'public' => DIR.'/../public_html',
Hope this fixes it.. wouldn't want to upset you any further ;)
Note: OP completely changed his post after the solution was posted...
I am going to write a detailed explanation in the wish that it spares the rest of mankind the issues and frustration that I had with it:
SCENARIO:
You are using Cpanel and are on a shared hosting. You have your main domain and then you also add "add -on" domains:
For your main domain
It is advisable to move all the files and folders EXCEPT the public one, to a folder just above the level of public_html, that is, outside the web root directory, basically for security issues. But this so far has nothing to do with removing the Public from the URL
Then, you can take that index.php that sits inside your original Public folder and move it one level above.
Now, as you probably know, the Request life cycle goes like this:
.htaccess------------> index.php ----------> bootstrap/paths.php and autoload and start files.---------> routes-->objects
SCENARIO 2.
Now you are going to add an add-on domain.. There is a direct way to do this:
Let softaculous install you the Laravel stuff and then, (only then) go to your cpanel, go to the section where the Add on domains are, and then EDIT the document root adding a /public at the end.
That is: DO NOT CREATE THE ADDON ADDING THAT PUBLIC at the end and then proceed to install Laravel. It will not work. You have to modify it ONCE you have already installed Laravel.
But note the following:
what you describe would apply when you only have one Main domain.I already had that one domain without the Public issue. The problem is when you add other domains (addon domains). You cannot throw all of the files and folders just above the public_html because they would crash and conflict and overwrite each other. That is the problem I would have. So, by doing as I write, there are no conflicts.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community