0

I have an azure website that when users visit I want to redirect them to the non www version via my web.config file

so if visitors type in www.example.comit will redirect them to example.com instead.

I wrote this regular expression to try to match this

www\/(.*).com\/(.*)

But it doesn't seem to work on Regexpal. I'm not sure if I'm just not using the site correctly.

How would I achieve this?

onTheInternet
  • 6,421
  • 10
  • 41
  • 74
  • Possible duplicate of [Windows Azure: How to 301 non-www url to www for a domain](http://stackoverflow.com/questions/6747007/windows-azure-how-to-301-non-www-url-to-www-for-a-domain) – ScottE Jan 24 '17 at 18:21
  • Do you need to check anything after `www.`, like ensuring it is a `.com` site? – Niitaku Jan 24 '17 at 18:32

0 Answers0