The word Religion comes from the latin religio, which no one knows exactly what it meant, but most believe it is from the verb ligare, that means to connect or to bind, and the prefix re- wich indicates an idea of repetition. The romans had period events in which they would pay homage to the deities (devas ? ) that were associated with water streams, fountains and woods, and also deities associated with human activities. Religio may indicate the repetitive aspect of these moments in which men connects to the deities.
Philosophy as clearer meaning ("love for wisdom") and as a greek root.
I don't think you can put the Dhamma in either, but at the same time it includes both. The recollection of the Devas could be interpreted as carachteristic of a religion,and the task of removing ignorance from ones minds can be seen as an act of a philosopher.