I observed Joomla, Wordpress along with other CMSs have blank index.html files in most their sub folders to avoid people from peeking in to the folder structure. My real question is why can't they forbid folder viewing while using .htaccess file rather than placing a blank index.html file into all of the folders. What are the differences and why they have selected index.html?

Thanks heaps.

Turning off folder 'Indexes' is better completed in the actual php.ini file instead of local .htaccess or local php.ini files.

Joomla (and Mambo before it) have been in existence a long time and therefore are used broadly on hosting that is shared servers. Your decision was come to use index.html files like a safe fallback because of the 'mixed' character of hosting that is shared. Clearly .htaccess files are apache only, may cause server 500 errors if there are any on servers not expecting them or maybe they contain directives not based on certain server configurations. Consequently automatically Joomla does not ship having a .htaccess file as a result. There's a htaccess.txt file that the user needs to set up place by hand when they activate certain features. The assumption is that the user knowledgeable enough to place the file in position will comprehend the effects and when it will kill their website they'll immediately comprehend the cause - because of the mistake rigtht after their actions.

As server configurations have advanced there's (sometimes heated) discussion concerning the current validity of using index.html files - but for the time being a policy is the fact that all add-ons should ship with 'blank' index.html files in most folders.