This is a complicated question, but an important one, so bear with me...

After reading
this article I'm concerned about keeping my URLs consistent. Basicly, it says that if, for a given page, you use one URL for the page itself and a different URL on other sites that link to your page, SEs won't realize that both URLs are referring to the same page and therefore won't rank your page properly.

Keeping those URLs consistent is a problem when you use URL rewriting to snag affiliate codes, i.e.:

http://example.com/aff_100/example_page.htm

is the link that an outside site uses to send you traffic. You re-write the URL to http://example.com/example_page.htm and set a cookie for Affiliate 100.

My understanding is that SEs will see those as two different pages and your page's rank will suffer.

Is my understanding correct?

If so, is there a way to re-write URLs without messing up the SEs ability to give your page a fair rank?

Thanks!