I'd like to pipe in with the solution I'm using that I think addresses the needs expressed -- forgive me if I'm wrong. I'm new to Joomla but am thoroughly enjoying learning about it.
The desire was expressed for a solution that both masks the subdirectory installation of Joomla and also allows for the access of other subdirectories on the website's domain.
I've installed Joomla on my domain in the "/j/" subdirectory. Here's the contents of my .htaccess file from the root of my domain:
Code: Select all
#These first two lines might already be in the file - no need to repeat
Options +FollowSymlinks
RewriteEngine on
# Redirect to the Joomla root folder
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(index\.html)?$ http://www.domain.com/j/ [R=301]
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
# Only apply to URLs that aren't already under folder
RewriteCond %{REQUEST_URI} !^/j/
# Don't apply to URLs that go to existing files or folders
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /j
RewriteRule ^(.*)$ /j/$1 [L]
Code: Select all
var $live_site = 'http://www.domain.com';
I've tested all approaches to the website and new subdirectories and it all seems to work.
Hope that helps someone!