Video thumbnail. Click to play
Click to Play

One of the most powerful, yet simple manipulations that can be done with your htaccess file is a basic redirect function. A .htaccess file resides in the web-root directory of most Linux servers that have Apache installed (which is a majority of the servers online). This .htaccess file is a text file which contains user-defined server configuration settings, which include URL manipulations.

The simplest and most common configuration setting is the redirect. Using this function, you can create pseudo directories and files on your local host that will redirect to other URLs. This can be used to hide (or cloak) affiliate links and manage the file linking structure of your website more efficiently. The syntax is simple:

redirect {local/pseudo location} {destination URL}

Example:

redirect    /facebook     http://www.facebook.com/pa…

If this htaccess file resides on my blog at http://www.matthewbredel.com and I typed in:

http://www.matthewbredel.com/facebook

My host will redirect the user to:

http://www.facebook.com/pages/Ryan-Moran-and-Matthew-Bredel/…

Try it!

Go to: http://www.matthewbredel.com/facebook

I think you would agree that the local URL is much cleaner and easier to remember than the destination URL.

Formats available: Windows Media (.wmv), Flash Video (.flv)

Tags: , , , ,