一直往前走 is things like "Keep going straight/ahead/forward"
一直往下走 and 一直往上走 could be interpreted as "Keep going upward" and "Keep going downward"
You may use it when you try to say like going upstairs or going downstairs.
They all have the similar meanings and they all make sense :)
Hopefully these could help :)
Best,
Amy