Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 22, 2012 @ 07:10
    Fuji Kusaka
    0

    Multilingual Website with Permanent Redirection

    Hi,

    I have a multilingual website and making use of the Ultimate Site Structure as proposed  by Cultiv. So my section looks like this

    Content
    -- www
    --- En
    --- Fr
    --- De

    So in my template www i have some configuration code that will redirect my website to either EN , FR or DE depending on the culture of the browser. Where i have some issues is here in the UrlRewriting.Config where i want the url to display 

    www.mywebsite.com/en or www.mywebsite.com/fr instead of the ugly www.mywebsite.com/en.aspx or www.mywebsite.com/fr.aspx

    So far this is how my Config looks like

     

     <add name="En" 
             virtualUrl= "^~/$"
            rewriteUrlParameter="ExcludeFromClientQueryString"
            destinationUrl="~/maritim"
            ignoreCase="true"
            redirect="Application"
            redirectMode="Permanent" />

        <add name="Home"
             virtualUrl ="^~/en.aspx"
             rewriteUrlParameter="ExcludeFromClientQueryString"
             destionationUrl="~/en"
             ignoreCase="true"
             redirect="Application"
             redirectMode="Permanent" />
        <add name="Accueil"
             virtualUrl ="^~/fr.aspx"
             rewriteUrlParameter="ExcludeFromClientQueryString"
             destionationUrl="~/fr"
             ignoreCase="true"
             redirect="Application"
             redirectMode="Permanent" />
    For the first one En works just fine but if when i click on either the FR or DE link on the website it redirects  me  to the EN again that is www.mywebsite.com/en
    Any idead why the other redirections are not working?
    //fuji

     

  • Greg Fyans 140 posts 342 karma points
    Aug 22, 2012 @ 16:32
    Greg Fyans
    0

    Hi,

    Is your browser culture test only on the WWW template, it doesn't exist on the sub-pages?

    Instead of adding a rule per language, can't you set the umbracoUseDirectoryUrls setting to true in the web.config and it'll do what you want?

    Cheers,
    Greg 

Please Sign in or register to post replies

Write your reply to:

Draft