Why is konnichiwa spelled こんにちは and not こんにちわ? Well, it is a bit of a long story, I fill in all the details in this slideshow. This presentation appears in the Memrise course 'Learn Basic Japanese' that you can find at the link below:
http://www.memrise.com/course/80119/learn-basic-japanese/