Ulster coach Mark Anscombe praises his team as they fight back to beat Cardiff and secure a home Pro12 semi-final against the Scarlets next week
The home team were slow to settle and it was Cardiff, who had nothing to play for, who had the better of the opening period.
The visitors took the lead on three occasions during the first half hour, with Hewitt opening the scoring with a try in the fourth minute after a good break from scrum-half Lewis Jones.
Young fly-half Rhys Patchell kicked an easy conversion in front of the posts.
Ruan Pienaar missed a penalty but made amends a minute later when he capitalised on a fumble by Harry Robinson in midfield to cross over as Ulster drew level.
With so much at stake, Ulster struggled to get into any sort of rhythm and a Patchell penalty in the 21st minute restored the visitors' advantage.
Ulster suffered a blow when World Cup winner John Afoa limped off with a suspected hamstring tweak after 22 minutes.
A Cardiff offside infringement allowed Pienaar to convert a penalty to tie the scores again at 10-10 but a drop-goal from a confident Patchell nudged the visitors ahead again at 13-10 before the interval.
Ulster had the wind at their backs in the second half and came out a transformed side, scoring 20 unanswered points in the first fifteen minutes after the break.
Andrew Trimble got the crucial try which put Ulster ahead for the first time in the game, powering through to ground the ball three minutes after the restart.
Pienaar converted and then tagged on two quick penalties as Ulster took control of the game and cruised into a 23-13 lead.
A mix-up between Robinson and Patchell enabled Trimble to kick and chase before sliding over for his second try of the game.
Pienaar continued his good night with the boot and his conversion saw Ulster storm into a 30-13 lead.
Ulster veteran Nigel Brady came on eight minutes from the end for his last appearance for the province.
Diack secured the bonus point with a try two minutes from the end after Hewitt was sin-binned for the Blues, who failed to score in the second half.
Ulster: J Payne, A Trimble, D Cave, S Olding, T Bowe; R Pienaar, P Marshall; C Black, R Best, J Afoa; J Muller, I Henderson; R Diack, C Henry, N Williams. Replacements: Fitzpatrick for Afoa (22), Jackson for P. Marshall (51), Brady for Best (52), , Court for Black (61), Tuohy for Muller (61), Doyle for Henderson (67), Allen for Cave (69), Nelson for Bowe (69). Cardiff Blues: D Fish; T James, G Evans (capt), D Hewitt, H Robinson; R Patchell, L Jones; T Filise, K Dacey, S Andrews, B Davies, L Reed, L Hamilton, J Navidi, M Paterson. Replacements: M Breeze for Dacey (49), Paulo for Reed (51), T Davies for Andrews (67), L Davies for Jones (74), M Cook for Paterson (74), Ma'afu for Filise (80). Not Used : Sweeney, Smith. Sin Bin: Hewitt (77). Referee: Neil Paterson (Scotland)