Hi Flora,
here is a clear description of your problem. I post it here so this can be useful for other users. Then I will send you a private message with the info you need.
You have a domain
www.site.com with a document root set on folder
public_html on the virtual host. You have installed Joomla on a subfolder named
subdirectory1.
You have also configured
.htaccess file in
public_html folder, so that when a user calls the URL
www.site.com/, he gets
internally redirected to
www.site.com/subdirectory1/, and the URL doesn't change, so the user doesn't notice the
subdirectory1 part in the URL.
Now, the problem is that all the URLs that Joomla builds inside pages still contain the
subdirectory1 part. And you just want to drop this.
To change the way Joomla builds URLs, first way is to change the document root to point to subdirectory1. But you can't do this because you don't have control on virtual host configuration. Your rewrite rule is not enough because you change the URI internally, but Joomla uses PHP_SELF or SCRIPT_NAME to set the base. So what is the solution?
Simple, just use the Joomla way to overrides the base path. Edit the configuration.php and change this parameter:
var $live_site = 'http://www.site.com/';
It works! Simple and effective.
Regards,
Luigi