That happenes to me sometimes. usually I click “Update permalink structure” and if that still doesn’t do it. I find a way to remove the .htaccess file, and replace it, edit it manually, and click update several times, until it works. It’s really a pain, I had to do that today, and all I did was add a static page, and then, changed my mind. FUN.