I have an Drupal 10 installation on my Macbook Air. The web root is ~/Sites/drupal10/web. I have a hosts file entry pointing d10.mf.local to localhost and I have an Apache Vhost set up with ServerName = d10.mf.local and DocumentRoot = ~/Sites/drupal10/web.

If I access the site using http://d10.mf.local the front page is displayed but as soon as I try to access any item in the menu the URL has /drupal10/web appended prior to the menu link. So assume I access the site from d10.mf.local and then click on menu Contact Us, instead of the URL being d10.mf.local/contact it becomes d10.mf.local/drupal10/web/contact and gives a page not found error. If I use d10.mf.local/contact the page is correctly displayed. I have been trying to get to the bottom of this for two days now and am stumped. If someone can point me in the right direction I would be most appreciative.

  • 1
    Menu links are cached. Did you clear the cache after changing the web server configuration?
    – 4uk4
    Commented Jun 8, 2023 at 9:13
  • Exactly - why on earth did I not realise that. Once the caches were cleared everything worked as expected. Many thanks for helping Commented Jun 9, 2023 at 2:03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.