Mono Support how to remove www and set 301 on urlrewriter 

Viewed 17271 time(s), 16 post(s), 1/21/2013 11:16:52 AM - by deska5
2/20/2013 9:28:16 PM
6018 Reputation 709 Total posts

Since I want the url to change from "domain.com" to "WWW.domain.com"

Is this correct ?


 <if header="HOST" match="^(http://domain.com)$">
  <redirect name="SiteCanonical" url="^(.*)$" to="http://www.domain.com" />
</if>

11
2/20/2013 10:10:54 PM
2218 Reputation 300 Total posts

Yes, this should work.

Regards,
Mario

12
2/20/2013 10:35:17 PM
6018 Reputation 709 Total posts

its not working....your previous code is working and making www.domain.com to domain.com but like i mentioned i want opposite....please double check on your end ?

13
2/20/2013 10:37:57 PM
2218 Reputation 300 Total posts

Sorry didn't see this part, change http://domain.com to domain.com.

14
2/21/2013 12:42:01 AM
6018 Reputation 709 Total posts

it is working but seems like it is somehow affecting other things...

Now it does what it is supposed to do...if I type this in address bar "mydomain.com" it becomes "http://www.mydomain.com":

But the problem is...

Like, now I am not able to see pages that I added from administration side...

If I go to http://mydomain.com/MyNewPage.aspx,,, it redirect me to "www.mydomain.com"

why ?

15
2/21/2013 11:07:49 AM
2218 Reputation 300 Total posts

Hello,

URL rewriting in MonoX is based on UrlRewriter.NET. You would need to check their support forums regarding this matter.

Regards,
Mario

16
1 2
This is a demo site for MonoX. Please visit Mono Software for more info.