L
L
Leonid Rozhentsev2020-12-31 15:37:26
htaccess
Leonid Rozhentsev, 2020-12-31 15:37:26

How to rename the root folder?

I created a small project on laravel, I want to upload it to hosting, but there was a problem: there is a htdocs folder in the domain folder - the root folder for statics. But in laravel the web root folder name is public. What to do? Contact hosting support or set up htaccess? Rename the folder on the hosting is obtained.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
on_click, 2020-01-02
@RLeo777

So that there are no jambs with redirects later, it is better to make a symlink. You drop the folder with the project into the root of the domain (next to the public_html folder). You delete public_html, only the folder with the project remains. Connect via ssh, go to the folder with the domain using cd (on the screen for example, the folder with the domain is called site.com, the folder with the project project), and enter the command

ln -s project/public public_html
she will create the necessary link
5fefb28269868709249997.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question