What is the difference between 只要 and 如果? What is the difference between these two sentences?

只要明天不下雨，我们就去爬山。
如果明天不下雨，我们就去爬山。

They seem very close in meaning.
The difference is, 只要 is used for the only condition, while 如果 usually doesn't.


  只要明天不下雨， 我们就去爬山。


[ As long as it doesn't rain tomorrow, ... ]

"It doesn't rain tomorrow" is the only one condition, the other things don't matter, e.g. wind blowing. So you could follow the sentence with 即使刮风我们也去。 (Even it's windy we still will go.)


  如果明天不下雨， 我们就去爬山。


[ If it doesn't rain tomorrow, ... ]

"It doesn't rain tomorrow" isn't the only condition, that means if it's windy tomorrow, we might not go climbing too.