What's the reason of rejection? I think you were out of status before applying for F1 (June to July), is this the reason caused rejection?
Anyway, you have to contact a lawyer to see if there is any way available to solve this problem, otherwise you will face 3 years bar if you have been out of status more than 180 day from the date you were laid off.