I am working on my client's project and they are using Drupal 8.
I discovered that when one uses http://example.com/index.php to access the webpage, the url generated by the menu items , the index.php part is included, i.e. http://example.com/index.php/aboutus instead of http://example.com/aboutus. And it leads to a wrong page.
And I checked with the template file which generates the menu, the url of the menu is generated by {{item.url}}
, which item is one single item of items for the available variables in the menu templates.
Available variables:
-menu_name: The machine name of the menu.
-items: A nested list of menu items. Each menu item contains:
-attributes: HTML attributes for the menu item.
-below: The menu item child items.
-title: The menu link title.
-url: The menu link url, instance of \Drupal\Core\Url
-localized_options: Menu link localized options.
Therefore I am asking if there are ways to get rid of the "index.php" in this case and in order to avoid drupal generating wrong url? Thank you very much