Copied to clipboard

Flag this post as spam?

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


  • Petras Surna 90 posts 144 karma points
    Apr 14, 2011 @ 04:39
    Petras Surna
    0

    /home/ doesn't work, /home does, why?

    I am using @umbraco.library.NiceUrl(@Id) to create URLs. The URLs it creates end with a /

    eg http://www.activia.com.au/activia-products/

    However, the ending / is not working for the Home page

    http://www.activia.com.au/Home/ doesn't work whilst
    http://www.activia.com.au/Home

    does.

    How can I get http://www.activia.com.au/Home/ to work?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 14, 2011 @ 08:15
    Jan Skovgaard
    0

    Hi Petras

    Is the umbracoUseDirectoryUrls set to true in the web.config file? (In the appSettings section).

    /Jan

  • Daniel Bardi 927 posts 2562 karma points
    Apr 14, 2011 @ 08:33
    Daniel Bardi
    0

    the umbracoSettings.config has an option to remove the trailing slash '/' from urls.. I'd recommend you give that a try.

  • Petras Surna 90 posts 144 karma points
    Apr 14, 2011 @ 08:44
    Petras Surna
    0

    I tried modifying

    <addTrailingSlash>false</addTrailingSlash>

    But that doesn't seem to do anything.

     

     

     

  • Ove Andersen 435 posts 1541 karma points c-trib
    Apr 14, 2011 @ 09:00
    Ove Andersen
    0

    Is there any other url rewriting rules in your web.config?

    Look for an <urlrewrite> tag and see if there is anything there related to your home page.

  • Petras Surna 90 posts 144 karma points
    Apr 14, 2011 @ 09:10
    Petras Surna
    0

    There are no rewriting rules.

    I can't see that tag in web.config or any other config.

    BTW, this is a 4.7 install.

  • Ove Andersen 435 posts 1541 karma points c-trib
    Apr 14, 2011 @ 09:33
    Ove Andersen
    0

    It means you don't have any iis rewrite rules messing stuff up. :)

    What's also weird, the adress http://www.activia.com.au/home/home/home also points to /home...

    Do you have a template with the alias "home"?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 14, 2011 @ 09:48
    Jan Skovgaard
    0

    Hi Petras

    I've tried to see if I could edit your post where you post the content from your web.config. Ufortunately I can't - So therefore I would urge yourself to do it, to remove the part with your connection string.

    If you can't edit it either, is it ok if I delete it then? Credentials are on display, which for your own safety's sake they should not be.

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 14, 2011 @ 09:55
    Jan Skovgaard
    0

    Hi Petras

    I deleted the post with your appSettings due to security concerns on your behalf. I hope your ok with that.

    When you copy/paste stuff from the web.config please make sure your credentials are not being displayed for the whole world to see :-)

    To sum it up shortly for those who want to help you out: umbracoUseDirectoryUrls IS set to true in the appSettings.

    /Jan

  • Petras Surna 90 posts 144 karma points
    Apr 14, 2011 @ 10:02
    Petras Surna
    0

    The password in web.config does not work but the post has been removed anyway by Jan. Thanks for that.

    Yes, I do have a template with the alias "Home".

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 14, 2011 @ 10:11
    Jan Skovgaard
    0

    Hi Petras

    Ok, but I better like to be safe than sorry :-)

    /Jan

  • Ove Andersen 435 posts 1541 karma points c-trib
    Apr 14, 2011 @ 12:10
    Ove Andersen
    0

    Could you try to rename that template to for example "HomePage"?

     

  • Petras Surna 90 posts 144 karma points
    Apr 15, 2011 @ 03:39
    Petras Surna
    0

    I tried this and it worked!

    Then I renamed it back to Home and for some reason the trailing slashes have disappeared.

    It's as though <addTrailingSlash>false</addTrailingSlash> suddenly kicked in.
    I was pretty sure I republished the site after adding it last time.

    I am going to use <addTrailingSlash>false</addTrailingSlash> as a standard from now on.

  • 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