I used to create blank page with redirect code in the header, however, as the number of product increase, it become hard to manage how do you manage it?
Can you explain in more detail what you are trying to do? It sounds like a job for a database, anyway. I keep my astore refs in my MySQL d/base, along with all the categories etc. Can you generate this redirect dynamically?