Quantcast
Channel: Troubleshooting
Viewing all articles
Browse latest Browse all 72

IIS URL Rewrite - with multiple domains

$
0
0

I have a website/application where the same pages run many websites (depending on the URL the pages display different logo,css,content etc). I am trying to force each website domain to redirect to the www. verison of the domain.

I have used the default Canonical Rule to start with in URL Rewrite then just changed the Match URL Pattern from:

(.*)

To:

(^domain*)

So that it will only do this for the non-www. version of the current domain and not match for all domains.

My plan is to create one of these for each domain that uses the system to redirect each one to the www. version.

When I test the pattern in IIS the rule matches as (I think) it should do. But when I go to the website it doesn't redirect, it just stays on the non www. version.

I've also tried an exact match of domain.co.uk to redirect to www.domain.co.uk but this also doesn't redirect.

Does anyone know where i'm going wrong or if this is even possible or if there is a better way of achieving what I need to do?


Viewing all articles
Browse latest Browse all 72

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>