This happens outside of Moodle. In your web hosting interface you must set http://mysite.com to point to the ~/directory (where the config.php file is). This may be called web root, DocRoot or something similar.
With that you need to match $CFG->wwwroot = ' http://mysite.com'; in your config.php.
You need to clean up the URL in the Moodle database through https://mysite.com/admin/tool/replace/.