fixed a bug in checking for rewriten embed-res algorithm, now sub domains taken in to account