Parse and Redirect to uri in Javascript
It can also be written in "one line" using regular expression:

window.location = window.location.hostname.replace(
    /^(.*)\.school\.edu$/,
    "ftp://ftp.school.edu/public/$1"
);


I believe in this case regular expression expresses the intent more clearly than using indexOf and string slicing, though tastes may vary.