03-24-2009, 06:21 AM
For any download or affiliate links, I recommend to always use what is commonly referred to as Search Engine Friendly URLs. These are links that look like URLs to a web folder rather than a script with a query string.
So your links look more professional and less like the work of a newbie affiliate or amateur webmaster.
Rather than a link like download?pid=32 you can display download/ultrasoft for example.
or for an affiliate link:
goto/instantbeauty rather than recycled-makeup.jp/affil/aid=457689 Which link would you click on?
With Linux-based hosting, it is easy to transform links in this way by means of the .htaccess file that is a text file with this exact name that you upload either to your home page folder or another one further along the directory tree branches.
Most of our scripts make use of this system of URL re-writing. Here is a typical .htaccess file that we may implement:
This is used with the Download Tracker script and the Affiliate Link Manager Script.
In this script the Apache web server Re-write engine is turned on. Then there are rules to obey according to the URL that is being accessed in the visitor's browser.
In the first case it is detecting a download URL. The first part of the rule is a pattern match for the name of a download file such as "game". In this case, the URL would be: mysite.com/download/game
Then the rule activates the real URL: mysite.com/dt/download.php?id=game
This runs the download.php script and passes the id parameter to the script.
The "$1" means the first parameter that is enclosed by the brackets in the pattern.
The [L] tells the server that this is the last rule to process if it got matched.
The next rule is for the Affiliate Link Manager software where we transform search engine friendly URLs to those suitable for use with the Affiliate Link Manager script.
It may seem complicated, but this code is a simple cut and paste to a text file that you name .htaccess and upload to your hosting. Then, as long as the scripts are installed in the given folders (/dt and /lm), the URL re-writing should just work transparently.
p.s. the pattern matching I mentioned uses a method called Relative Expressions if you want to look it up and study the subject.
So your links look more professional and less like the work of a newbie affiliate or amateur webmaster.
Rather than a link like download?pid=32 you can display download/ultrasoft for example.
or for an affiliate link:
goto/instantbeauty rather than recycled-makeup.jp/affil/aid=457689 Which link would you click on?
With Linux-based hosting, it is easy to transform links in this way by means of the .htaccess file that is a text file with this exact name that you upload either to your home page folder or another one further along the directory tree branches.
Most of our scripts make use of this system of URL re-writing. Here is a typical .htaccess file that we may implement:
Code:
RewriteEngine On
RewriteRule ^download/([-0-9a-zA-Z]+)/?$ dt/download.php?id=$1 [L]
RewriteRule ^goto/([-0-9a-zA-Z]+)/?$ lm/redirect.php?name=$1 [L]This is used with the Download Tracker script and the Affiliate Link Manager Script.
In this script the Apache web server Re-write engine is turned on. Then there are rules to obey according to the URL that is being accessed in the visitor's browser.
In the first case it is detecting a download URL. The first part of the rule is a pattern match for the name of a download file such as "game". In this case, the URL would be: mysite.com/download/game
Then the rule activates the real URL: mysite.com/dt/download.php?id=game
This runs the download.php script and passes the id parameter to the script.
The "$1" means the first parameter that is enclosed by the brackets in the pattern.
The [L] tells the server that this is the last rule to process if it got matched.
The next rule is for the Affiliate Link Manager software where we transform search engine friendly URLs to those suitable for use with the Affiliate Link Manager script.
It may seem complicated, but this code is a simple cut and paste to a text file that you name .htaccess and upload to your hosting. Then, as long as the scripts are installed in the given folders (/dt and /lm), the URL re-writing should just work transparently.
p.s. the pattern matching I mentioned uses a method called Relative Expressions if you want to look it up and study the subject.
![[Image: promo.gif]](http://www.mypregnancymy.com/pic/promo.gif)
![[Image: medic.gif]](http://1.bp.blogspot.com/_S9ERnV-LEcs/SzslqrS9k2I/AAAAAAAAAGk/ULpgyUDFmws/s1600/medic.gif)