strange..there’s gotta be a reason why it wasn’t working before. the 404 error that I was getting was solved by enabling the mod-rewrite module in apache. but anyways, everythings working fine for you too, thats the best part.
hey pals, I had the same problem. Searched a little in the wp documentation about permalinks. Seems that to use the permalinks other than the default one, mod-rewrite needs to be enabled in apache server. I followed the steps and enabled the mod-rewrite module and now everything is working fine. here’s the documentation https://codex.wordpress.org/Using_Permalinks