How to do mod rewrite public folder

I am on mod rewrite apache, my folder path is /sys/public

when I do the following .htaccess in the /sys/ folder I am getting a blank page.

<IfModule mod_rewrite.c>

RewriteEngine on
RewriteRule ^$ /sys/public/ [L]

</IfModule>

What is your apache2 configuration.

Usually in the linux, we set web root to:

/var/www/html/suitecrm/public

Then in .htaccess file, it is set to:

/legacy/

The .htaccess file located at /public/legacy/ folder.

I would like to rewrite to url from domain.com/sys/ to domain.com/sys/public

hence I am creating the .htaccess in domain.com/sys

RewriteEngine on
RewriteRule ^$ /sys/public/ [L]

am I doing it correctly?

Sorry, I do not have idea about that.

1 Like

Hello Eugene,

that doesn’t sound correct.

Overall, the easiest method to install your SuiteCRM would be under a subdomain, not a subfolder.
sys.domain.com e.g.
In this case, you don’t have to worry about any server / redirect config, just install and it works out of the box.

In a subfolder, it might be more difficult (I haven’t actually tried it in Suite 8, I think).
You should not see the ‘public’ in your URL. So if anything you’d need to redirect from sys/public to sys. But that won’t work, since the webroot would be incorrect.

Ideally, just go back to the installation docs:

and make sure you’ve set everything up accordingly.

If you don’t have the right environment (SSH, VPS, VHosts to configure), best to get the right environment first. Installing SuiteCRM in the right environment works out of the box in a few minutes.

yes agreed, using subdomain indeed works better, set the path of the subdomain directly to the /sys/public indeed much more simpler.