I have my dev site running in a sub-directory and I do have RewriteBase configured in the .htaccess to point to that sub-directory. However, links within site pages that go to things like "/some/thing.html"
end up not working because they go to localhost/some/thing.html
instead of localhost/backdrop/some/thing.html
.
Is this the expected behavior?
I have a use case that sounds somewhat similar where there is a main domain and backdrop is just a portion of it running in a subdirectory. What we did was set the vhost to a parent directory, created the subdirectory for backdrop within which we have the default .htaccess, core, etc. Everything seems to work just fine. We did not modify base_url.
In a custom module we needed to use
$path = backdrop_get_path('module', 'custom_module');
and to reference it in some places we needed to use
$image_url = base_path() . $path . '/images/desired_image.png';