homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Implications of using rewrite + /link/ redirect for outgoing links
is it an acceptable practice, and what damage might it to do my SE listing

10+ Year Member

Msg#: 98 posted 12:17 am on Jan 12, 2003 (gmt 0)

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?




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

Msg#: 98 posted 12:42 am on Jan 12, 2003 (gmt 0)


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.



10+ Year Member

Msg#: 98 posted 8:57 am on Feb 14, 2003 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved