Hi,
how to make the link to my homepage maximally short?
What I have (example): www.example.com/home.html
What I would like to have: www.example.com
Of course webpage made in Contao.
Printable View
Hi,
how to make the link to my homepage maximally short?
What I have (example): www.example.com/home.html
What I would like to have: www.example.com
Of course webpage made in Contao.
There are a few ways you can do this.
It may be as simple as setting your home page's alias to "index". I've never seen this officially documented anywhere (I sort of stumbled upon it by accident), but it seems to work for the installations I've tried it on. Try that first and see if it works for you.
If you know a little PHP, you can tap into Contao's "generateFrontendUrl" hook (http://www.contao.org/en/hooks.html#generateFrontendUrl). You can check that the URL passed in is for the home page, and then return the URL without the alias and suffix (which I think in most cases would just be a blank string).
The "folderurl" extension is very popular -- it lets you use subfolder-type URLs (i.e. /about/team/ceo.html). Included is a checkbox in page settings labeled "Initial Page" that makes any page act like the index page. Since we use this extension for all of our sites this tends to be the way I do it.
One note on "folderurl" -- if you use it, you need to turn "use auto_item" off in your settings.