.htaccess

.htaccess is a type of computer file for the configuring of some web servers. .htaccess files can be used to create custom error pages, or to prevent visitors from directly linking pictures, also known as hot-linking to their own sites, costing the website owner bandwidth and therefore money.

 Preventing direct or Hot-linking 
A .htaccess file is put onto the website, so that people will not be able to go onto the URL of the image (picture) (example: www.website.com/image.filetype). Owners can replace this picture, after they upload the file, with a message, or it can be made to redirect to an error page.

 Examples of .htaccess being used 
 MediaWiki 
By default, MediaWiki uses http://www.example.org/index.php/Main_Page type of URL to display the main page. But by changing the .htaccess and LocalSettings.php, it can display URLs like http://www.example.org/wiki/Main_Page so that it will look nicer (like Wikipedia).

 Wordpress 
By default, all posts made in Wordpress uses http://www.example.org/?p=123 to display posts. But it can be changed into URLs like http://www.example.org/2010/06/postname in .htaccess and the permalink setting in the site admin of that blog.

 .htaccess 
htaccess file is to cache the image on the browser so that next time the website does not take much time to load.

 References 

Category:Internet