An Algerian political activist was handed a two-year jail sentence for insulting the Holy Prophet (PBUH).