Che linguaggio dinamico vuoi usare?? Per fare quello che vuoi devi usare un "url replace" adatto al tuo server.