$base_path is not added to AJAX URL request in login form I have a D7 site in a subfolder, and would like for AJAX requests to find the correct docroot folder.

When trying to login from localhost/mysite/user, AJAX sends a request to localhost/system/ajax. I've read that you can use the global variable $base_path for this, so I gave it a try, still the same error. I've checked in Firebug and indeed Drupal.settings.basePath does have the correct path. In settings.php is it written like this $base_path = '/mysite/';.

This made me wonder if the JS logic does not include the $base_path value by default and what would be a correct way to add this in. The site is tracked in Git, so I've also experimented with Apache configurations, such as ProxyPass, ProxyPassReverse, and ReWrite rules in order to prevent having to push changes that would risk breaking the site on the remote server.

I'm new to Drupal and not so experienced with Apache directives, any help here would be awesome :)
First off, in the settings.php file you should have an example of http://www.example.com and a comment there, saying that you should not append a trailing slash.
Next, in your case looks like http://localhost would be the correct value of $base_url, if any - try hashing out $base_url line to see if the site is fine without it - as it might be.