IE7 z-index issues

If you have z-index issues, particularly with drop down menus in IE7 this conditional script may help.

<!--[if IE 7]>
	<script type="text/javascript">
		$(document).ready(function(){
			$(function() {
				var zIndexNumber = 1000;
				$('div').each(function() {
					$(this).css('zIndex', zIndexNumber);
					zIndexNumber -= 10;
				});
			});
		})
	</script>
<![endif]-->

Force Files To Download Instead Of Open In Web Browser

You can change the file directivies for a folder by adding a .htaccess file in the folder and including the following code:

<IfModule mod_headers.c>
<FilesMatch "\.(?i:mp3|ogg)$">
      ForceType application/octet-stream
      Header set Content-Disposition attachment
</FilesMatch>
</IfModule>

This will force .mp3 and .ogg files to prompt for action rather than open with the default browser setting. The IfModule condition is recommended as it will prevent an error message if the Apache headers module is not installed.

Prevent Access And Directory Listing To A Folder Using .htaccess

If someone browses to a folder on your website that does not have an index file it will, by default, list the directory’s contents. If you have an Apache based web server you can prevent access to this folder by placing a .htaccess file within it containing the following code:

Options -Indexes

This can also be placed at the root of your site as it will be inherited through the sub-directories. Using Options -Indexes does not prevent access to the folders from scripts running on your website so you can still, for example, list the contents with PHP and download the files.