Although Raquel Welch is imprisoned in Segovia’s Alcázar, whose façade we see, when she escapes on stilts with the help of three of the Musketeers, she is in fact crossing the courtyard of the Christian part of the Alcazaba, quite a way away.
In Segovia Raquel Welch, D’Artagnan’s bit on the side, is held in the Alcázar castle, or at least its façade is used, and when rescued by the Musketeers, is taken to a convent, which is in fact the monastery of Uclés in Cuenca.
At the end of the film, when the body count is completed and D’Artagnan, played by Michael York, achieves a kind of reconciliation with Cardinal Richlieu, played by Charlton Heston, he leaves the Cardinal’s quarters and we see him among the arcades in the grounds of the Aranjuez palace.
Our thanks to Carlos Martín, historian and cinema fan at the Alcazaba for this information.