Help with redirect and query strings

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-05-10T21:54:45Z Indexed on 2010/05/10 22:14 UTC
Read the original article Hit count: 191

I'm a total novice at mod rewrite so I'll try and present my question as clearly as possible:

I'm trying to create a url redirect of the following (static) affiliate url that can append it self to any product links after using a query string:

affiliate url: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1=

product url: hxxp:// example.domain.com

What I want to achieve is redirecting the affiliate code as below and being able to add dynamic product urls after as the following examples show:

rewritten affiliate url: hxxp://domain.com/go

affiliate url + product url: hxxp://domain.com/go?=http://example.domain.com

redirects to: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1=http://example.domain.com

© Stack Overflow or respective owner

Related posts about mod-rewrite

Related posts about rewriterule