It's definitely a dick move for the apartment company to do, BUT if you signed a lease that said you had to give 30-days notice they are probably within their rights to charge you that fee.
You'll want to check your lease and see if it says anything about the Reletting fee. It's probably in...