Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.2.2
-
Fix Version/s: 4.3.0-b2
-
Component/s: None
-
Labels:None
Description
The following error may be encountered when attempting to install Blesta:
Mod rewrite is not enabled, or htaccess is not supported by this server. You must disable pretty URL support in Blesta by removing the .htaccess file.
This occurs either when mod_rewrite is not enabled on the server, or in the case of this task, when Apache MultiViews is enabled on the server. Because the Blesta install URI /install/ does not actually exist, Apache will look for files named install.* and it will find and load install.php, which is the file that displays the mod_rewrite error.
Blesta has no need to support MultiViews since the framework handles routing, so
- Disable Apache MultiViews in the .htaccess file:
<IfModule mod_negotiation.c> Options -MultiViews </IfModule>
When installing Blesta 4.2.2 on PHP 7.0.27 I encountered the mod_rewrite error, which says essentially that mod_rewrite is not enabled and that you must delete the .htaccess file to proceed. The problem is that mod_rewrite was enabled.
I was able to complete installation by renaming the .htaccess file. Once installation via GUI was completed, I restored the .htaccess file back, and pretty URL's worked fine, which confirmed that mod_rewrite was in fact enabled.
Looking into it, we have had several customers complain about this error.
It appears that the check we are performing to see if mod_rewrite is enabled may not work properly in some versions of PHP/Apache. We should look into how this check is performed, and update as necessary.