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 )

19092 put(a) pogledan, 16 odgovor(a) 21.1.2013. 11:16:52Kreirao(la) deska5
super

super

20.2.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>
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
mzilic

mzilic

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

Regards,
Mario
Ovaj sadržaj još nije ocijenjen. 
2218 Reputacija 300 Ukupno objava
super

super

20.2.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 ?
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
mzilic

mzilic

20.2.2013. 22:37:57
Sorry didn't see this part, change http://domain.com to domain.com.
Ovaj sadržaj još nije ocijenjen. 
2218 Reputacija 300 Ukupno objava
super

super

21.2.2013. 0: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 ?
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
mzilic

mzilic

21.2.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
Ovaj sadržaj još nije ocijenjen. 
2218 Reputacija 300 Ukupno objava
1 2