Wifi server to control led on and off from local webpage.. - ..if statement doesnt work...
Pretty sure your problem is coming from the fact that you chose to use the backslash as your terminator character. The backslash requires special handling when encoded as a URL. You can observe this by Googling for "\" and and the results page you'll see your query in the address bar assigned to the "q" variable:
q=%5C
my entire URL looked like this, you may have something a bit different:
https://www.google.com/?gws_rd=ssl#q=%5C

Ok - so if you want a quick fix, stop using the \ to terminate your commands, since backslashes are often used to help sort out special characters (like "TAB" as \t) it's a a really bad choice, but an honest mistake.

If you change your code to generate links terminated with dashes you can get around the issue

client.println("&lt;a href='/arduino/on-'&gt;ON&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");
client.println("&lt;a href='/arduino/off-'&gt;OFF&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");


and of course change your readStringUntil invocation too

client.readStringUntil('-');


Edit:
You might want to use the "" if the hostname part of your URL contains a space:
http://my-web-server.com/on

And one more alternative, seek the "%" instead since that's going to be used to encode the backslash. In that case you just need to change the readStringUntil()