we are doing some affiliate tracking on a wordpress membership site with mod_rewrite. basically the URLS are domain.com/AFF_ID and AFF_ID is the members tracking id, this all works perfectly.
the problem comes in when members go to the affiliate tracked url domain.com/AFF_ID and login using domain.com/AFF_ID/wp-admin this generates a 500 error. rather than tell them not to use the affiliate id in the login URL i need to create a rule to remove everything before /wp-admin and the domain
basically
domain.com/could-be-anything/wp-admin
becomes
domain.com/wp-admin
i have tried various rules with no effect or i create an redirect loop. i would post what i have tried but they dont come close to working.
thanks for any suggestions,
Sean