Look for .htaccess only on Apache or LiteSpeed

Doesn't make any sense to look for a .htaccess file if bludit is running on other web server that isn't Apache or Litespeed. I've just placed a small verification to not generate errors if you try to install it using Nginx, for example, and the .htaccess file isn't in place.(
This commit is contained in:
Alexandre Teles 2016-08-23 01:57:21 -03:00 committed by GitHub
parent f6d33a8a8d
commit eb3d5955de
1 changed files with 2 additions and 3 deletions

View File

@ -190,8 +190,7 @@ function checkSystem()
$phpModules = get_loaded_extensions();
}
if(!file_exists(PATH_ROOT.'.htaccess'))
{
if ((stripos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || stripos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false) && !file_exists(PATH_ROOT.'.htaccess')) {
$errorText = 'Missing file, upload the file .htaccess (ERR_201)';
error_log($errorText, 0);