Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike 80 posts 101 karma points
    Apr 18, 2014 @ 13:11
    Mike
    0

    Need help in UrlRewriting

    hi,

    i am struggeling with an url rewrite in umbraco 4.5. 

    I need to show a different template for a domain (in this case a mobile version). 

    So if somebody is using: 

    http://m.domain.com/
    http://m.domain.com/page1 ; http://m.domain.com/page1/subpage1 etc. etc.

    the site should show the same page, but with another template (called mobilemaster).

    I cannot get this to work. I appreciate some help with this. I tried this, but it is not even catching the virtual url

     <add name="mobilerewrite"
        virtualUrl="(http://|)m.domain.com/(.*)"
        redirect="Application"
        rewriteUrlParameter="IncludeQueryStringForRewrite"
        destinationUrl="~/$1/mobilemaster"
        ignoreCase="true"/>

    thanks

     

     


  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Apr 18, 2014 @ 15:29
    Alex Skrypnyk
    0

    Hi Mike,

    Could you show your structure please? Why do you use destinationUrl="~/$1/mobilemaster" ?

    Thanks, Alex

  • Mike 80 posts 101 karma points
    Apr 22, 2014 @ 10:16
    Mike
    0

    Hi,

    not sure, I thougt the $1 would insert the original url request and just add a mobile template using mobilemaster

    so

    http://m.domain.com/
    http://m.domain.com/page1 ;
    http://m.domain.com/page1/subpage1

    the default url is:

    http://www.domain.com/
    http://www.domain.com/page1 ;
    http://www.domain.com/page1/subpage1

    what i try to accomplish is if somebody uses 

    http://m.domain.com/page1 ;

    it effectively returns

    http://www.domain.com/page1/mobilemaster (thus, the orignal site with an alttemplate)

    thanks

     

     

  • Mike 80 posts 101 karma points
    Apr 24, 2014 @ 15:14
    Mike
    0

    Can somebody shed a light on this?

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies