I have these rewrite rules that I need to make them work when both are inserted in URL Rewrite.
On image one the FIRST RULE makes my website to have superb performance when I insert it under URL Rewrite.
But I can't make it work alongside the SECOND RULE. Without the SECOND RULE, I get error 404 on every page that I try to access on my website.

However, I can leave the SECOND RULE under URL Rewrite and then move the FIRST RULE to CONFIG section. It works but not as superb as I have the rule under URL Rewrite.

So, how can I make the FIRST and SECOND rules work when both are under URL Rewrite?