Not able to redirect to public legacy after install

I just install suitcrm 8.0 in shared hosting.give owner and permission through cpanel terminal.
and able to access and setup cron.checked in config file url mention subdomain dot mymaindomain dot com. hostname also menton subdomain dot mymaindomain dot com

but problem is if i access subdomain dot maindomain dot com its show all the files and folders as file directory, then if i click public folder i able to access perfectly.

my question is how could i access crm by typing url : subdomain dot maindomain dot com
dont want to type subdomain dot mydomain dot com / public

i confuse in this document novice user sorry for that.

could you you please share am i have to change htaccess in this folder subdomain dot maindomain dot com or subdomain dot maindomain dot com/public/legacy folder.

if i edit url/public/legacy/.htaccess how could it forward from main url to this public folder?

  1. You do it thru the mod_rewrite module. Did you enable mod_rewrite?
  2. Did you set your DocumentRoot and Allow Overrides in .htaccess like this?
<VirtualHost *:80>

    DocumentRoot /<path-to-suite>/public
    <Directory /<path-to-suite>/public>
        AllowOverride All
        Order Allow,Deny
        Allow from All

  1. Just wondering, any reason why not install version 8.5 with the most recent fixes?

In whuch folder I just need to paste this code in htaccess file? One is is in main folder? Anothet one in public folder?

Path to suite directory how i should write?

Subdomain dot main domain dot com/public


Cpanelusername/subdomain dot mydomain dot com

I extracted all the file and folder in “subdomain dot mydomain dot com” means sundomain root.

Really appreciate your help.

My hosting not updated maria db.last time its give error. Thats why just try to run first then install with updated one with latest php and mysql and maria db.

“In which folder I just need to paste this code in .htaccess file? One is in the main folder?”

Yes, where your subdomain dot mydomain dot com root folder is.

“Path to suite directory how should I write?”

On cpanel, the DocumentRoot is usually something like this:

<VirtualHost *:80>

   DocumentRoot /home/cpanelusername/subdomaindotmydomaindotcom/public
   <Directory /home/cpanelusername/subdomaindotmydomaindotcom/public>
      AllowOverride All
      Order Allow,Deny
      Allow from All


Still not redirecting

And also password not working.

Warning, these steps could make your site inaccessible if any unforeseen consequences happen, so you really should ask your hosting tech support to help you by doing this for you. Their tech support should know exactly what to do. It’s normal apache configuration.

Can you edit this apache config file your site:
sudo nano /etc/apache2/sites-available/subdomaindotmydomaindotcom the name should be something like that. This file should already exist.
Then can you put those settings into it, from above. You have to follow the apache config file syntax rules. It should already have the “VirtualHost” block. You just have to edit the contents of it a little to get those settings into it.
Note, You should also apply those settings to the <VirtualHost *:443> block, for https.
Then sudo systemctl restart apache2

from hosting support they say if i paste this in subdomain root htaccess its not working.

are you sure i need to paste this code in my htaccess file or i need separate type of code to redirect to legacy folder?

in another thread one poster write i should able to install from root url , if it not redirecting to install location first i need to fix this redirect issue then install.otherwise after install i will face problem.

got confuse what i need to do

first fix this redirect issue?
or first install then fix redirect issue?

What control panel do you have on your host?
Ask you hosting support, how to use that control panel to let you edit the apache virtual host config for your subdomain?

cpanel hosting.litespeed server.

I write this in root htaccess file:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteCond %{REQUEST_URI} ^/back2$ [NC]
RewriteRule ^(.*)$ /back2/public/$1 [L,R=301]

In back2 folder main suitcrm extracted files are located and installation files are in

i try to achieve if someone types
it wil redirect to

I tried: paste this file in and separately neither way working.

What’s the contents of your VirtualHost block, in your Apache conf:

I didnt see any file in that location.

I solved my issue.

Changing document root from cpanel addon domain setting.cpanel have option to change document root for main domain and addon domain and sub domain.


You could provide some screenshots, so it will help others in the future.