rewrite_rule – working fine but broken for pagination

At first blush, your code looks solid. Two suggestions:

1) Try putting the longer rewrite rule before the shorter one. It’s possible that the first one is being matched (because it is a subset of the longer one) and then not proceeding to check the longer one.

2) Whenever you modify rewrite rules, you have to flush and reload the rewrite rules for them to take effect. The simplest way to do this is to go to Settings > Permalinks and click Save.

EDIT: Got it. Change your second rewrite rule to resources/([^/]+)/page/([0-9]{1,})/?. You had one too many wildcard segments.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)