contao

Is it possible for Contao to not redirect to home page alias?


Older Contao versions by default did not redirect to the first public page, so the front page was displayed with both domain.com and domain.com/front-page.html and neither was redirected to the other. However the newest Contao at least (4.8) does force a redirect from domain.com to domain.com/front-page.

There is one setting, Do not redirect empty URLs, which looks like it could do the trick, but, in my case at least, does not seem to do anything.

So how do I prevent Contao from redirecting from a "blank url" to the first published page of a website root? I'd much rather redirect the other way around, from /front-page to /.


Solution

  • Simply set the alias of your start page to index. The generated URL by Contao for the page with the alias index will always be without a path.

    See also the documentation about page aliases (English version still WIP).