.htaccess redirect your main site to a specific sub folder without showing sub folder name from URL bar

Normally, the root directory is under public_html where you upload your main site. But in my case since i have multiple sites and to keep my root directory clean as possible. With this technique through .htaccess you may able to redirect your main site to a certain sub folder without showing the sub folder name from the URL bar.

Reminders: If you have your current working site make sure to back up everything before starting.

  1. (if you have running site) move everything to a sub folder you have created public_html/yoursubfolder
  2. create .htaccess under public_html
  3. Then copy the following rules and save.
RewriteEngine On

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

PHP extension fileinfo is missing from your system (Composer)

Missing Error while installing certain projects through Composer. “Your requirements could not be resolved to an installable set of packages”

 Problem 1
 - intervention/image 2.3.6 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
 - intervention/image 2.3.5 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
 - intervention/image 2.3.4 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
 - intervention/image 2.3.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
 - intervention/image 2.3.2 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
 - intervention/image 2.3.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
 - intervention/image 2.3.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.

Here’s some basic solution that might help you.

  1. Open your php.ini inside your local server under php folder.
  2. Find and un comment the following lines:

from

,extension=php_fileinfo.dll

to

extension=php_fileinfo.dll

3. Restart your local machines and try to install again.