How To

  Homes arrow How To arrow Rank and File
 Webmaster Tools
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
Password Strength
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Forums Sitemap 
Weekly Newsletter
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
  >>> SIGN UP!  
  Lost Password? 

Rank and File
By: Developer Shed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0

    Table of Contents:

    Rate this Article: Poor Best 
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article




    Rank and File
    by Pamela Heywood

    Server redirects are not exactly an enthralling subject,
    until you realise just how POWERFUL and useful these things
    are. Reasons including; easier site management, professional
    looking links to use in email, nearly fool-proof affiliate
    link cloaking and preserving your search engine ranking
    should convince you that it's worth five minutes to grasp
    this very simple technique. There's nothing to buy: your
    site's web server already has this facility.

    jl scott, the Director of iCop, came up with a question
    about redirects. She had noticed that, with her page
    redirects to cloak affiliate URLs, her redirect pages come
    up for a couple of seconds. Whereas, my redirects go
    straight to the page they're calling. And, naturally, jl
    wanted to know what I was doing differently ...

    First of all, I should explain that jl was using what's
    termed as a meta-refresh. You may be familiar with them,
    where you make an HTML page for the redirect you need and
    put a tag something like this in the head of the document:

    <.META HTTP-EQUIV="refresh" CONTENT="0; url="

    (The . period after the angle bracket has been added just
    so that the code displays above. You wouldn't need it.)

    This method is fine and it works. When someone visits the
    page you made, they do see it for a moment or two, before
    the refresh kicks in and takes them off.

    Where it falls down is, because these aren't totally
    fool-proof for cloaking purposes (people CAN switch off
    redirects, or stop the page to discover the link in the
    code) and they're NOT liked by the search engines.

    So, let me tell you about the method I am using, which,
    you'll be pleased to hear, works fine for both of those.

    My links are formatted simply:


    To the "nak`d eye" that looks like I have a directory on my
    server, called "i-cop". You'd probably assume there is an
    index.html in it, using a redirect similar to the one above.

    That I use a mass of similar links, might lead you to
    believe I have a huge mess of sub-directories on my site
    and that I will never be able to find anything!

    Not so! Because my redirects are done by a mixture of magic
    and slight of hand, known as "Server Redirects". There's no
    mess and confusion, as none of the pages actually "exist!"

    This is a tip I picked up from Michael Campbell, who is
    advising people to put affiliate links inside of server
    redirects -- that is doing them via the .htaccess file.

    You'll understand why in a moment ...

    First off, I want to make sure you understand what an
    .htaccess file is. So I'll wait here while you scan the:

    Comprehensive guide to .htaccess

    You also need to know that this works on Unix servers
    (that's most of them), but not on NT.

    Once you know what an .htaccess file is, how to upload it,
    etc., we can make one and configure your redirects in the
    file. If you're using Windows, you MUST use a plain text
    editor like Notepad. Word or any of those other fancy things
    will NOT do. Mac users will need to ensure they "save as"
    a Unix text file with BBEdit, to get carriage returns.

    The redirects are written in the following format:

    Redirect /i-cop

    That is, each one (on it's own line) comes in three parts.

    Redirect (and then a space)

    /i-cop (i.e. forward-slash, the name you call it and then a

    Followed by ...

    .. i.e. the URL that you want people to visit
    (be redirected to).

    Thus ... if someone requests (clicks on):

    The .htaccess file is read and the server says hey, there
    isn't a real page called that, but I do have instructions
    to send you instead to ...

    ... and off you go. In just a trice. Invisibly.

    (Yes, you can click on them to try them out.)

    When you are done, you save it as .htaccess (yes that's a
    PERIOD and htaccess as in no name and that extension. If
    your computer won't let you do that, you can save it and
    upload it as a .txt file and re-name it via ftp. BEWARE
    though, it will likely "disappear" from view once you upload
    or re-name it. Do not be alarmed. This is quite normal. Just
    try a link to assure yourself that it is really there. :)

    Now here are the added advantages to using this method:

    1. Easy Site Management

    It's just a simple text file. I have mine hovering around
    open most of the time so it's easy to add something and re-
    upload it. The links then work anywhere. It also acts as
    handy a reference list to keep track of all my affiliations.

    If links need to be changed, it's a simple matter to alter
    them wholesale from one location. By using these links on
    web pages, as well as in email, there's no messing about
    trying to find the "offending" link through 101 HTML pages!

    Yes, you can also use them internally, for pages you moved,
    renamed or removed or that are just too long to use in
    email. Just follow the same convention and give the full URL
    to the new page on your site. One example of that I use is:


    You'll notice that you do go to a page on my site, but it is
    a bit long winded for email and breaks in half:

    2. Preserving Your Search Engine Rank

    You lose "points" with some Search Engines by giving away
    page scores to affiliate (or other outside) links going off
    your site. Using this method to link to what the engines
    will basically see as "internal pages" (despite them being
    non-existent), helps preserve your rank.

    3. Keeping Hold of Your Commissions

    This also acts as fool-proof link and commission theft
    cloaking. Specially useful where these are Clickbank links
    that can be altered, not just from email, but also the ones
    online. Anyone can hover over a link, read the destination,
    copy and adapt it. Not with this method, they can't!

    Forget JavaScript cloaking methods. Those require that users
    have JavaScript turned on and, in any case, don't hide links
    in other browsers, such as Opera. This works on the server,
    so it doesn't matter what setup your visitor has.

    Oh sure, the real URL will still show up in the browser
    afterwards, but they'd had to click to get there and so
    are already tagged with your affiliate tracking cookie.

    (You could add another layer to this, by configuring the
    affiliate links in a link tracking program, then listing
    the tracking URLS in the .htaccess file.)

    Disadvantages? None that I know of.

    My .htaccess file also includes a LOT of other information
    and uses, as well as a LONG list of links, so that the file
    now weighs in at around 19 K. It's still very fast.

    There is however one WARNING:

    You may already have an .htaccess file that is doing
    something that your site needs it to do; if you have custom
    error pages already set up, if you have a login area for
    members, a forum with passwords, etc.

    You may not know this, because it frequently does not show
    up in the list of files you'll see in your ftp program.

    Uploading a new .htaccess file for the first time should
    therefore be viewed with extreme CAUTION.

    If you do already have one, then no problem, you can just
    keep adding stuff to the one you've got.

    If you've used a web designer, or had a programmer add
    something to your site, those would be the people to ask
    before proceeding. If you've done it all yourself or are
    starting a brand new site you SHOULDN'T run into trouble.

    (SmartFTP - FTP Client Easier site management. Want to see
    your .htaccess and other "hidden" files in the server?
    You'll be able to with SmartFTP, meaning more control, less
    room for error. )

    Copyright 2003 Pamela Heywood
    Get All Good Things for Your Personal and Business Success
    My short, weekly, newsletter brings you help & resources you
    can use today. Subscribe
    Or visit:

    You are welcome to publish this article in your newsletter
    or on your website, provided that it is reproduced in its
    entirety and with the above resource box intact.
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More How To Articles
    More By Developer Shed



    - Traffic Down One Month? Don`t Panic
    - How to Handle Fake Reviews
    - Facebook Game Update Tweaks
    - Facebook Profile Tweaks
    - How To Download Your Facebook Profile
    - Facebook Tips for Hiding Your Friends List
    - Facebook Tips to Avoid Unwanted Friend Reque...
    - Blog Contests: Do it Right
    - Simple Technique for Memorable Headlines
    - Understanding Your Analytics Results
    - Your Guide to Creating Quality Back Links
    - Getting Your True Ranking: Going Beyond Goog...
    - Optimizing for Google
    - The Right Way to Build Reciprocal Links
    - Monetization: How Not to Put Multiple Ad Ven...

    Developer Shed Affiliates


    © 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap