The credit card companies spend a lot of time preventing exactly what you're trying to do. Not that there haven't been loopholes, but they're quick to plug them.
Visa/MC/Amex gift cards have a service charge, which as you might expect, is far more than the value of any miles you'd get.