by Usman Asar.
Simply change into
and that's it, you are done.
Dennis, there are two ways you can achieve this
1: keeping the installation in moodle directory and redirect the URL (assuming you are using CPanel on your hosting, simply go to redirects and mention the directory www.mydomain.com/moodle so anyone typing in www.mydomain.com will be taken to /moodle automatically, this is recommended method as it makes upgrades and creating replicas to moodle easier.
2: Like Noah said, move the files from /moodle to the root directory and then update your config files, you will be able to find the config.php file in your moodle installation directory, from there open it and give path, like for example your current info would be
$CFG->wwwroot = 'http://www.mydomain.com/moodle';
Simply change into
$CFG->wwwroot = 'http://www.mydomain.com';
and that's it, you are done.