updated rewrite rules
skip hidden files when looping over folder content