So I've taken part in a very interesting Drupal project that has a multilingual Drupal 7 site and three sub-sites (all using the same domain) in sub-directories of the main Drupal site. So it's kind of like this:
http://example.com <- main Drupal site http://example.com/site1 <- php site that doesn't use Drupal http://example.com/site2 <- php site that doesn't use Drupal http://example.com/site3 <- php site that doesn't use Drupal
Now I can create relative links to these sites on the Drupal site by adding links like
<a href="site1">Site 1</a>
And that works when I'm on the homepage, but since this is a multilingual site, any other page I go on uses a language prefix on the URI like this:
If I try to click on the Site 1 link I made above while on the contact page, it takes me to:
and displays a 404 error.
Currently, the site uses hard-coded absolute links to get around this issue, but it's becoming a real pain to use this in our local and testing environments and I've been asked to remove the absolute urls from these links.
Any ideas on how I can create links to these sub-directories without hard-coding them?