This paper presents several measurements of total production cross sections and total inelastic cross sections for the following reactions: π⁺+C, π⁺+Al, K⁺+C, K⁺+Al at 60 GeV/c, π⁺+C and π⁺+Al at 31 GeV/c. The measurements were made using the NA61/SPS Heavy Ion and Neutrino Experiment spectrometer at the CERN Super Proton Synchrotron (SPS). Comparisons with previous measurements are given and good agreement is seen. These interaction cross sections measurements are a key ingredient for neutrino flux prediction from the reinteractions of secondary hadrons in current and future accelerator-based long-baseline neutrino experiments