When I git pulled my DEV build to my live shared server,

it was placed one directory down from public_html like this:


So to allow the domain name to load the site directly, I added this to the public_html's .htaccess file:

# Redirect to the web folder.
RewriteCond %{REQUEST_URI} !^/mydirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /mydirectory/$1
RewriteRule ^(/)?$ mydirectory/index.php [L]

This allows the site to load,

but to log into Backdrop CMS I still have to use the full path:

because this doesn't work:

Also, once people navigate to any other pages, the site reverts back to the full path, instead of just loading from top level,
so instead of seeing this in address bar:

they see this:

How do I fix that for user login and page navigating?


I don't know .htaccess well enough to tell you how to fix it there. 

Here is the approach I would take. 

1) Just manually move the backdrop root directory into public_html


2) Add public html to your git repo

Your repo could look like this:


You could add this directory to your local repo, commit it, and push it to the server. I guess, I'm confused about how you can install Backdrop below the public_html directory. This does not sound like a good idea.

Do you have the git repo in Backdrop root?

I used to always keep .git in Drupal/Backdrop root directory. Now, I include a directory called htdocs, src, or public_html inside the git repo so that git operates a level below Backdrop CMS root.