www re-routed to root

Jan 9, 2008 at 12:53 AM
Hi All,

First, I wanted to say that BlogEngine.NET rocks! It was really a lifesaver ... we were looking at trying to get WordPress set up on our dedicated Windows 2003 Server. Problem is, since our main project is in ASP.NET / SQL Server, installing WordPress would require Apache / PHP / MySql, which is a lot of infrastructure.

We set up BlogEngine.NET on http://www.zendear.net. However, I noticed that if you go to the browser and enter the URL with the 'www', it routes you to http://zendear.net.

We kind of would like to go the opposite way ... have http://zendear.net route to http://www.zendear.net. Is this possible to do? Could anyone tell us what code is doing this redirect?

I see in Fiddler 2.0 that is a 301 permanent redirect that is being done.

Also, I actually have the need to do this URL redirection on our main online dating site http://www.zendear.com. Right now, I'm doing it with 2 IP addresses and 2 IIS websites (pretty inefficient).

Thank you very much!!!
Jan 9, 2008 at 8:17 AM
Edited Jan 13, 2008 at 2:36 PM
Hi, for your blog routing to www: configure the 'www subdomain policy' in your blog's admin settings to 'enforce''

Secondly for your non-blog website, you can redirect all incoming URLs to 'www' by an URL Rewriter. Either custom develop the required code or use something like URLRewriter. In addition to the IIS configuration without such rewrite tool:

Use a single website instance with both hostnames: zendear.com and www.zendear.com it will listen for.
Look at this screenshot for example

This way you only need 1 IP address, 1 website, 1 version of your content.

Good luck and hope this helps,
Mike

BTW: check out Google's Webmaster Tools if you like to control what URL to display in search results: with or without wwww.
Jan 10, 2008 at 1:35 AM
Edited Jan 10, 2008 at 1:37 AM
Mike,

You ROCK! Thank you so much for your help! I can't believe we missed that setting to 'enforce' the www subdomain policy. I looked it over, my wife looked it over, neither of us saw it the first time through (or perhaps we didn't understand it and glanced it over).

We have URLRewriter set up, we're using it for the chinese version of our internet dating site. URLRewriter is really cool, we have 1 page and the presence of the prefix 'chinese-' on a page causes it to convert to Chinese.

http://www.zendear.com/online-dating.aspx
http://www.zendear.com/chinese-online-dating.aspx

This has been quite an adventure for us ... I'm learning .NET programming and my wife is learning Photoshop, HTML, and JavaScript. It's fun, though. :)

We really appreciate your help and thank you for sharing your expertise and knowledge!!!


MikevZ wrote:
Hi, for your blog routing to www: configure the 'www subdomain policy' in your blog's admin settings to 'enforce''

Secondly for your non-blog website, you can redirect all incoming URLs to 'www' by an URL Rewriter. Either custom develop the required code or use something like http://urlrewriter.net. In addition to the IIS configuration without such rewrite tool:

Use a single website instance with both hostnames: zendear.com and www.zendear.com it will listen for. See an example screenshot at:
http://www.c-sharpcorner.com/UploadFile/desaijm/asp_net_photoalbum02122006183031PM/Images/Multiple_Domains.gif

This way you only need 1 IP address, 1 website, 1 version of your content.

Good luck and hope this helps,
Mike

BTW: check out https://www.google.com/webmasters/tools/ if you like to control Google what URL to display in search results: with or without wwww.


Jan 12, 2008 at 12:03 AM
Edited Jan 13, 2008 at 2:37 PM
Hi Zendear, glad you could use my pointers. Thank you for letting us know it works. If you'd ask me, the true heros are all developers of the BlogEngine.net team.

zendear also wrote:
This has been quite an adventure for us ... I'm learning .NET programming and my wife is learning Photoshop, HTML, and JavaScript. It's fun, though. :)
We really appreciate your help and thank you for sharing your expertise and knowledge!!!


Oh yes, it's a wonderful adventure for all of us. Good luck with continuing your .NET journey and I hope your wife gets the hang out of Photoshop. Though far off-topic, she might enjoy PSDTuts.com to discover some really great Photoshop tutorials.

All the best!
Mike