The .htaccess (hypertext access) file is extremely powerful and is mostly used on Apache web servers to control the handling of various tasks such as the delivery of custom error files and the rewriting and redirecting of URLs.
You may have come across the .htaccess file during a WordPress installation; it rewrites URLs to make them shorter and search engine friendly.
Another important function controlled by the .htaccess file is redirecting search engine spiders (and visitors) to a new location upon deletion of a web page or a change of URL. A 301 redirect informs the search engines of a permanent change in URL. A 302 redirect is temporary.
In order to comment out a line in a .htaccess file, just add the hash sign (#) to the start of the line containing the information you want the server to ignore.
This is the default .htaccess file for a brand new WordPress installation:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Other posts you might like to read
Tools, resources and services used by The Blogging Academy
- Powered by WordPress
- Theme - Personally modified version of Twenty Ten
- Hosting - KnownHost
- Mailing List - Aweber
- RSS Feed - Feedburner | Subscribe
- Analytics - Google Analytics | GetClicky
- Remote Blogging - Windows Live Writer
- Notes and Screengrabs - Evernote
