From http://www.d20pfsrd.com/gamemastering/combat/#TOC-Concealment
You can’t attack an opponent that has total concealment, though you can attack into a square that you think he occupies. A successful attack into a square occupied by an enemy with total concealment has a 50% miss chance.
I had previously assumed that when you move into darkness, an opponent (who doesn't have darkvision or blindsight or any other ability to help them detect things in darkness) still knows what square you are in and can make attacks against you at 50% hit chance, but if you make a successful stealth check in the darkness they don't know which square you occupy and so can't attack you.
So is the 50% hit rate from concealment only applicable against opponents with blindfight or are there other situations in which your opponent can know the square you occupy and make attacks at 50% hit chance.
Also back to my original question, if the rogue's target is lit, but the rogue passes through a dark area en route to it, would they get the sneak attack automatically, or get a stealth check for it, or not at all? (assuming the rogue has darkvision but the target has no darkvision/blindsight/e.t.c)