Both are considered legal and accepted versions.
As written, they are different feats that share the same name and similar mechanics. Much like how the Pact Wizard (Familiar Folio) and Pact Wizard (Harrow Handbook) are wizard archetypes with the same name but are different from one another.
The Divine Fighting Technique feat in the Weapon Master's Handbook requires you to have the same alignment as the Deity whose technique you're using, it lets you choose an option from those listed under Divine Fighting Technique in the Weapon Master's Handbook.
The Divine Fighting Technique feat in the Divine Anthology requires you to worship the deity whose technique you're using, it lets you choose an option from those listed under Divine Fighting Technique in the Divine Anthology.
Pathfinder Society, Paizo's organized play campaign, has introduced a house rule that allows you to qualify for options listed under one of the feats which only having the other feat. This requires you to still meet the alignment or worship prerequisite for the other feat.
Campaign Clarifications:
Weapon Master's Handbook
Page 10—The Divine Fighting Technique feat qualifies you for divine fighting techniques in other sources, as long as you meet the prerequisites listed in that source. For example, you must worship your chosen deity as your sole patron deity to qualify for the divine fighting feats on page 28 of Pathfinder Player Companion: Divine Anthology.