Hi Thanks for the feedback.
I've corrected the case issue and it's still not working. From what i can see the 'if' statement on line 2 isn't looking at the DG as I get redirected to www.domain.com.
doing a redirect will be difficult as marketing have a requirement that all sites have their own hostname. I would still need to modify/replace the uri so that I can direct the traffic to a different folder on the website.
How would I 'replace' the uri instead or retaining/modifying it? Would it be simpler to forward traffic like this nick.domain.co.uk/ -> nick.domain.co.uk/nick/?