hi tvigar,
I have found the part of the plugin script that creats the .htaccess file
in the file components/com_sobi2/plugins/download/download.class.php
line 716
$htaccesPath = _SOBI_CMSROOT.DS.$this->directory.$sobi2Id.DS.".htaccess";
if(!file_exists($htaccesPath)) {
$htaccess = "<Files *>";
$htaccess .= "\n\t\t Order Deny,Allow";
$htaccess .= "\n\t\t Deny from all";
$htaccess .= "\n\t\t Allow from localhost";
$htaccess .= "\n </Files>";
if($htaccessFile = @fopen($htaccesPath,"w")) {
if(!@fwrite($htaccessFile, $htaccess)){
trigger_error("sobi_download::uploadFile(): Cannot put content in .htaccess file for protecting download directory");
}
@fclose($htaccessFile);
}
else {
trigger_error("sobi_download::uploadFile(): Cannot create .htaccess file for protecting download directory");
}
}
you can change the code generated in the htaccess file with any code you find convenient
$htaccess .= "\n\t\t Order Deny,Allow";
$htaccess .= "\n\t\t Deny from all";
$htaccess .= "\n\t\t Allow from localhost";
or maybe you can delete the whole code
$htaccesPath = _SOBI_CMSROOT.DS.$this->directory.$sobi2Id.DS.".htaccess";
if(!file_exists($htaccesPath)) {
$htaccess = "<Files *>";
$htaccess .= "\n\t\t Order Deny,Allow";
$htaccess .= "\n\t\t Deny from all";
$htaccess .= "\n\t\t Allow from localhost";
$htaccess .= "\n </Files>";
if($htaccessFile = @fopen($htaccesPath,"w")) {
if(!@fwrite($htaccessFile, $htaccess)){
trigger_error("sobi_download::uploadFile(): Cannot put content in .htaccess file for protecting download directory");
}
@fclose($htaccessFile);
}
else {
trigger_error("sobi_download::uploadFile(): Cannot create .htaccess file for protecting download directory");
}
}
and the htaccess file won't be created at all
regards,
Mostafa