I hope someone has a quicker / neater way to do this but here is one way that will give you the effect you are looking for.
With your file as it is displayed above. Select one of the rectangles (not the top one). Double click on the shape itself to allow you to edit the path. Click on the path everywhere it goes under another rectangle to add new vector handles in those places. Then use the scissors tool to cut away the segments of line that would be hidden behind the other rectangle(s). Do this for the four rectangles that are behind others and leave the top one alone.