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)
4 Responses
Ryan Moran
April 7th, 2008 at 9:37 pm
1I just had a “duh!” moment. Been trying to figure out a way to do some redirecting, and I hadn’t even though to do an .htcaccess file. Duh… I suppose that’s why you’re the mastermind.
Matthew Bredel
April 8th, 2008 at 6:31 am
2I spent awhile trying to find a solution to this problem (including cheesy cloaking programs, etc.), but they did not work well and these redirects are SO easy. It was a true lightbulb moment when I stumbled about these htaccess files.
mark
April 9th, 2008 at 7:31 am
3nice little intro to .htaccess files
Links for the Weekend, 4-12-2008
April 12th, 2008 at 5:42 am
4[…] Htaccess and Redirects for Dummies - A good intro… […]
RSS feed for comments on this post · TrackBack URI
Leave a reply
Follow Matthew Bredel
at http://twitter.com
Categories
Archives
Tags
7 figure code 7 Figure Secrets 2008 Affiliate Marketing affiliate summit backlinks best wordpress theme blog bonus chicago Conversion eBay ebay live eCommerce freelance jobs freelance writing improvements Internet marketing internet marketing strategy Jeff Walker link exchange live mike filsaime networking Newsreaders online content online marketing ousourcing India product launch formula reciprocal links RSS RSS Feeds search engine rankings SEO Social Marketing social networks tips tom beal video web 2.0 weblogs WhatDoISell wordpress theme wordpress themes worldwide brands(Save $20!)
Friendly Blogs
Friends of Mine
My Sites
Pages
Inside the Internet Marketing Mind is proudly powered by WordPress - BloggingPro theme by: Design Disease