Let’s say I have a URL like this:
http://example.com/ABC
How can I trap the ABC after the / and drop it into the partner_code? The ABC is always a 3 or 4 letter string and never has anything after it.
This causes the site images, CSS files, etc. to blow up:
RewriteRule ^(.*)$ index.php?partner_code=$1&utm_source=partner&utm_medium=link&utm_campaign=$1 [L]
You’re on the right track. If you include some conditions that makes it ignore requests for resources that exist (like css/images/etc.) and be a little more strict about the regular expression, it should work.
Try: