1. Home
  2. Hosting and Web
  3. Web and PHP settings
  4. PHP frameworks – Laravel and Symphony on Hosting

PHP frameworks – Laravel and Symphony on Hosting

For the right functioning of PHP frameworks Laravel or Symfony on the hosting it is necessary to edit the root directory of the domain and set the correct path for the directory public.

There are two possible options

  1. Change of the root directory via WebAdmin
  2. Edit the .htaccess file

Change of root directory via WebAdmin

Continue to Root directory of the domain and direct the website to the public directory.

Editing of .htaccess file

RewriteEngine On
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]

Updated on September 19, 2024

Was this article helpful?

Related Articles