If the screw holding the rail are rusty it indicates that there has been some water penetration and in the worst case the wood that the rail attaches to has become rotten.
If the existing rail is serviceable then remove it completely and clean off all mastic from the rail and caravan.
Drill some small pilot holes in the caravan where the awning rail is to be fitted and insert a screw to determine whether the wood is sound and capable of holding the rail.
If the wood is OK then drill the new holes in the awning rail so that it will pick up new fixings when replaced
Apply a large bead of a non setting mastic, such as Carafax IDL, our part 118573, to the awning rail and refix to the caravan using the new screw holes and new screws.
If the wood in the caravan is not capable of holding the new screws then the wood will need to be replaced and this is accomplished from inside the caravan - a major job.