Well, they didn't wash it as often, for one thing. As a child I read a book about a girl's experience crossing the wilds of our early country in a wagon train. She mentioned that they washed their hair monthly. I don't recall any mention of what they used for hair washing, however, so I assume it was the same soap they used for washing the body, which was also done as infrequently.
Later I found recommendations published in a US newspaper circa 1902 or 1904 (there-abouts) that suggested women use Castille soap (flaked & mixed with water to produce a kind of paste) about every 2-4 weeks, if I recall. So it seems the norm in the US was to use a plain mild soap for washing the hair. I do believe the newspaper article talked about rinsing well, maybe 2-3 rinses, something like that.
Maybe a hairdresser would have more knowledge about the history of hair washing.
And I am sure it may vary depending on continent and what was available.