MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

how to remove www and set 301 on urlrewriter  (Mono Support )

Viewed 19096 time(s), 16 post(s) 21.01.2013 11:16:52by deska5
super

super

20.02.2013 21:28:16
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>
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
mzilic

mzilic

20.02.2013 22:10:54
Yes, this should work.

Regards,
Mario
Dieser Inhalt wurde noch nicht bewertet. 
2218 Reputation 300 Total posts
super

super

20.02.2013 22:35:17
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 ?
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
mzilic

mzilic

20.02.2013 22:37:57
Sorry didn't see this part, change http://domain.com to domain.com.
Dieser Inhalt wurde noch nicht bewertet. 
2218 Reputation 300 Total posts
super

super

21.02.2013 00:42:01
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 ?
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
mzilic

mzilic

21.02.2013 11:07:49
Hello,

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

Regards,
Mario
Dieser Inhalt wurde noch nicht bewertet. 
2218 Reputation 300 Total posts
1 2