Bug #1315

Routing: URLs with/without trailing slash change meaning of relative links

Added by Matthias Hörmann almost 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Must have
Category:
MVC
Start date:
2008-08-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Both the URLs e.g. /typo3cr/setup and /typo3cr/setup/ call the same controller code.

If a relative link to e.g. "install" is created in that code it will point to either
"/typo3cr/install" or "/typo3cr/setup/install" depending on the URL used.

Suggested solution:

Add the trailing slash before calling the controller code so both versions
give the same result.

#1

Updated by Bastian Waidelich almost 13 years ago

  • Status changed from New to Accepted
  • Priority changed from Must have to Should have

The problem is not the routing mechanism, but the way browsers resolve relative links.
So there won't be away around a base-tag like it's needed in current "realurl"-websites (well, apart from using absolute urls).

I'll leave the ticket open as a reminder, that we need to allow leading slashes in routes. Right now they're ignored, but it probably should be possible to create "mycompany/about-us.html" as well as "mycompany/about-us/".

By the way: We're currently working on a link-helper which generates correct links based on configured routes, so you won't have to deal with slashes anyways.

#2

Updated by Karsten Dambekalns over 12 years ago

  • Subject changed from URLs with/without trailing slash change meaning of relative links to Routing: URLs with/without trailing slash change meaning of relative links
#3

Updated by Karsten Dambekalns over 12 years ago

  • Priority changed from Should have to Must have
  • Target version set to 1.0 alpha 1
#4

Updated by Karsten Dambekalns over 12 years ago

  • Status changed from Accepted to Closed

The problem is with the way browser interpret some URLs. It is correctly solved by using a base tag together with helper for link/URI generation. The "hidden feature" is now feature request #2738.

Also available in: Atom PDF