Add rewrite rules for permalinks

Change try rule to a rewrite rules on non-existing file so the permalink can be working without being ssoed