No. It only works if the subject of the two clauses is the same. For example:
After HE finished the work, HE had a rest = After finishing the work, he had a rest.
You can take the shortcut of a reduced clause in this situation, because 'he' is the subject of both parts the sentence. It was the same person who finished the work and had a rest ('had a rest' sounds more natural to me than 'took some rest', but that's a minor point).
You can't do this if the subject of the two clauses is different. For example:
'After he finished the work, his girlfriend gave him a big kiss.'
If you say 'After finishing the work, his girlfriend gave him a big kiss' this would mean that it was the girlfriend, not the man, who had finished the work.