Add rewrite rules for permalinks

Change try rule to rewrite rule so the permalinks are working without being ssoed