Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite to hide affiliate links

syntax help needed

         

madeonmoon

1:21 am on Jul 11, 2004 (gmt 0)

10+ Year Member



hello all,

say i have an affiliate link [example.org...]

what would the mod_rewrite directive look like to redirect a link like this [example.org...] to [example.org...]

is it even possible?

thanks,
james

jdMorgan

3:12 am on Jul 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



madeonmoon,

That's a pretty simple exercise, please see our charter [webmasterworld.com].

The general format would be


RewriteRule <regular-expressions-pattern> <substitution>?<query_string> [R=301,L]

However, this redirects from http://www.example.org to http://www.example.org/affid=mysite, as you requested above, so it is actually *adding* the affiliate link. It may be that you wish to redirect from http://www.example.org/affid=mysite? to http://www.example.org instead.

Apache mod_rewrite documentation [httpd.apache.org]
Apache URL Rewriting Guide [httpd.apache.org]
Regular Expressions Tutorial [etext.lib.virginia.edu]

Jim