The real-life basis for the "Fore and Aft" Regiment might be a nickname of the Glocester Regiment, which has a cap badge on the front and back of its headdress. This is a battle honor earned when the regiment faced off two forces of enemy troops by standing its companies back-to-back. Kipling was probably playing cute by using a real regiment's nickname to provide realism but giving it a cover name to prevent embarrassing the real regiment.