| 12:03 am on Jan 8, 2008 (gmt 0)|
We'll be needing some examples of the URLs and their corresponding script paths to proceed. ALso, some clarification of "cannot access the aff ID" would be helpful.
What modified rules have you tried with these URLs and what was the result? How did the results differ from your expectations?
| 2:19 am on Jan 8, 2008 (gmt 0)|
Thanks - I'll dig up some of the testing that I previously tried.
In terms of "cannot access the Affiliate ID" - what I really meant was that if I load the page 'www.mysite.com/foo/bar/?AFF=ID' - the $AFF variable is empty (has no value at all).
| 2:41 am on Jan 8, 2008 (gmt 0)|
>>$AFF variable is empty
Aside from .htaccess issues, is your new affiliate tracking software working properly? Are orders tracking right?
| 2:54 am on Jan 8, 2008 (gmt 0)|
No - I'm just beginning to plan the affiliate program and the first step was to look at how I'd pass the variable, set cookies, redirect and so forth.
So all I did was type in an example URL with the?AFF=ID at the end - and was surprised that the variable wasn't available on the page (I've checked by trying to echo the variable as well as getting through get_defined_vars)
| 3:13 am on Jan 8, 2008 (gmt 0)|
Give QSA (query string append) a try:
RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/$ /index.php?VAR1=$1&VAR2=$2 [QSA,L]
| 3:15 am on Jan 8, 2008 (gmt 0)|
Ah, clearer now. In order to pass the AFF= name/value pair through the RewriteRule where you are passing the VAR1 and VAR2 parameters to /index.php, you will need to use the [QSA] --Query String Append-- flag on the rule. Otherwise, your VAR1/VAR2 parameters will replace the original AFF= query by default.
Merging [QSA] with your existing flag, use [QSA,L].
| 7:08 am on Jan 8, 2008 (gmt 0)|
Thank you! Worked perfectly.