works with sites hosted on paths (eg example.com/abc/)