Help with .htaccess on websites.

Hello Community, I’m new here and need help.

I have the latest version of HestiaCP installed on Ubuntu 22.04.
I’m installing a website that requires .htaccess. This website is called WebEngine CMS for a game server called Mu Online.

When I run the installer, I get the error:
Apache .htaccess (private directories are accessible by everyone).
All extensions required by this CMS are installed correctly.

This is the content of .htaccess:
RewriteEngine in
RewriteCond %{REQUEST_URI} !^/admincp/$ [NC]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9-_/]+)/?$ index.php?page=$1&subpage=$2&request=$3 [QSA]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ index.php?page=$1&subpage=$2 [QSA]
RewriteRule ^([a-zA-Z0-9]+)/?$ index.php?page=$1 [QSA]

I don’t know what to do anymore, can you help me? I use WHM/cPanel, but I want to migrate to HestiaCP.

In the first line you have a problem

is not RewriteEngine in
must be RewriteEngine on

if the problem continue, check if you have Apache mod_rewrite enabled
a2enmod rewrite && systemctl restart apache2

1 Like

Hi. I’ve fixed it and a2enmod rewrite is enabled, but it persists.

I took a quick look at the install script of WebEngine on github. It seems that it tries to download the includes/config/webengine.json file and expects a HTTP 403 response.
If your installation is correct, than the includes directory also contains .htaccess file with the following content:

deny from all

it prevents web access to any file in the inclueds directory. I hope this helps.