I am in a unique situation where I have multiple instances of Joomla setup under my primary domain in different subdirectories.
For example:
example.com = Joomla instance
example.com/subdirectory1 = Another Joomla instance
example.com/subdirectory2 = Another Joomla instance
On the main Joomla instance I was able to forward my non-www pages to www using the htaccess file and this code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule (.*) http://www.example.com/$1 [L,R=301]
I want to also forward non-www pages to www pages on all of the subdirectories.
What would be the best way to achieve this? Since each subdirectory has it's own Joomla instance, is there something I can just add to each of the htaccess files?
I have tried adding this line the the .htaccess files within the subdirectories:
RewriteOptions inherit
However, it actually forwards the non-www pages to www.example.com and removes the subfolder from the URL.
I have searched this issue for days but have only come up empty. Any help would be greatly appreciated!