U4-2884 - Trailing slash in URL breaks page

Created by Damian Green 18 Sep 2013, 15:17:53 Updated by Sebastiaan Janssen 18 Sep 2013, 16:05:13

If you add a / to the end of a url for a page items such as images & style etc disappear from the page.

I have tried this on an old v4 site and it doesn't affect it - unless there is something odd in how i have urls. Most of the urls are rooted eg /images/001.gif

Should this affect the page if you have a trailing slash?

If so then a further issue is the RTE insert link (to a page in the site) adds a trailing slash! This may need a further issue raising if this is a problem also.

Comments

Sebastiaan Janssen 18 Sep 2013, 15:42:08

  1. What is your addTrailingSlash setting set to in umbracoSettings.config?
  2. What is your umbracoUseDirectoryUrls setting set to in web.config?
  3. Are you running in a virtual directory?
  4. "most of the urls are rooted" -> are these the ones disappearing or the ones that aren't rooted?


Damian Green 18 Sep 2013, 16:00:49

1 = true 2 = true 3 = no - root of domain/website 4 = all the ones that are not rooted

I have tried altering the slash setting but still does it.

Do i need to root all my scripts/css/images etc to ensure this doesnt happen? Is that the only way?


Sebastiaan Janssen 18 Sep 2013, 16:05:10

1, 2 and 3: perfect! 4: yeah this is the problem, make them all start with a slash and you're good to go.

It's pretty easy: if you're on yourdomain.com/about/ then will result in a link to yourdomain.com/about/images/001.gif instead of yourdomain.com/001.gif.

So just go through all of your templates and make sure you refer to the images correctly and the problem is gone!


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.3, 6.1.4, 6.1.5

Due in version:

Sprint:

Story Points:

Cycle: