In case you didn't get this sorted out, looking at the rewrite rule you have in your pastebin link
RewriteRule ^(.*)$ http://www.diviniti.cc/joomla-1.5.20/$1 [R=301,QSA,L]
there's a few things that are defeating your desires here:
- the
R=301 directive will make the browser actually 'go away' and load up the rewritten url, changing the URL in the browser
- your desire to also redirect any
non-www subdomains to a www subdomain also conflicts with your desire to keep the joomla part of the URL hidden from the browser.
Instead try two rules:
Options +FollowSymlinks
RewriteEngine On
# 1. redirect (bounce) all non-www to www [as per apache docs][1] - retaining query strings
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.example.com/$1 [L,R,QSA]
# 2. then, use joomla but hide the joomla dir - note the lack of 'R' directive
RewriteRule ^(.*)$ /joomla-1.5.20/$1 [QSA,L]
If you don't care about enforcing the "all subdomains should be www" just skip rule #1, leave rule #2.
You don't need the second rewrite you had in your pastebin, for the 'root':
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(*.)?diviniti\.cc$
RewriteRule ^(/)?$ joomla-1.5.20/index.php [L]
because the ^(.*)$ in my supplied rewrite also matches the case where the url is http://www.example.com/
Now, it's possible that Joomla itself will not be happy with this chicanery, it may deeply not like being at this pseudo-root while the documentroot says something else and it's possible it will barf.
1 : http://www.purpleslurple.net/ps.php?theurl=http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#purp130 "per apache docs"