Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Implications of using rewrite + /link/ redirect for outgoing links

is it an acceptable practice, and what damage might it to do my SE listing



12:17 am on Jan 12, 2003 (gmt 0)

10+ Year Member

I'm planning to add a mod rewrite rule so that a selection of my outgoing links (that I want to track) are specified in the form: /link/http://the.remote.link.com, with the rule designed to remove /link/ and force a 301 redirect to the site (ensuring that the redirect only occurs if the http referer is my site itself, and the outgoing link is one specified in a rewrite map). The purpose of this is so that I can pick up /link/XYZ in my logs.

Are there any considerable downsides of doing this? Is it a worthwhile practice?



12:42 am on Jan 12, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member


Just a comment... You should also allow the rewrite to occur if the referrer is blank. Many people using Norton Internet Security, certain firewalls, corporate proxy servers, etc. will have their HTTP_REFERER field blocked (and may not have a choice about it), and might otherwise perceive your site to be broken.



8:57 am on Feb 14, 2003 (gmt 0)

10+ Year Member

As a follow up, I have been using this mechanism for a while now, and my observations are:
- it works correctly for most UA's.
- it fails to work for a number of automated UA's (search engine's) who take the original URL ("/link/http://foo.bar") and remove the double back-slashes ("/link/http:/foo.bar") which gets them a 404.
I think that I may be non standards conformant with this approach. I have seen other approaches that do something like "/link/http/foo.bar" which is probably so that they can work around the above breakages.

Featured Threads

Hot Threads This Week

Hot Threads This Month