Лучше будет написать так:
```
var needSlice = (document.location.href.indexOf("http://") != -1);
var url = document.location.href.slice(0, document.location.href.indexOf("?"));
document.location.href = "http://www.ischool-ssau.ru/Account/LogOn/?extUrl=" + (needSlice ? url.slice(7) : url);
```