Regex assistance for htaccess puzzle.
September 27, 2006 4:16 PM
Subscribe
Regex assistant for redirecting affiliate links.
Currently my affiliate links are structured like:
http://
ecommercesystem.com/app/aftrack.asp?afid=123456&u=
mysalespage.com
Where '123456' is a multiple digit affiliate ID and the u variable is where the ecommerce system sends the referred user after they are tagged by the affiliate system.
I'd like to make it easier for my affiliates to be able to create affiliate links in the form:
http://myssite.com/aff/123456/ppp
Where ppp is a multi-letter product code that tells which salespage to send to. I could have multiple lines in the htaccess for each product code 'aaa', 'cat', 'dog', etc. Hopefully this can be done with a polite 301 redirect.
Thanks!
posted by ao4047 to computers & internet (6 comments total)
1 user marked this as a favorite
http://en.wikipedia.org/wiki/Mod_rewrite
posted by jcruden at 5:03 PM on September 27, 2006