Forum Moderators: phranque

Message Too Old, No Replies

RewriteBase to a Directory above current directory and down one level?

         

atherton

7:27 pm on Jul 10, 2007 (gmt 0)

10+ Year Member



Hi there,

Sorry for the complicated title, not sure best how to describe what i need to do -- but here goes.

I have 2 domains, both are 'addon' domains on my HostGator account.

Domain 1
goes to public_html\domain1

Domain 2
currently goes to public_html/domain2
but i need it to go to public_html/domain1/subdirectory

So I can get my Joomla installs to share users.

I have tried various RewriteBase forumlas to home/username/public_html/domain1/subdirectory and ../domain1/subdirectory but neither seem to work.

Got some 404s, 505s and a few that just seemed to ignore RewriteBase all together.

Anyone have any ideas? This even possible?

jdMorgan

8:22 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Generally, you cannot access anything above what the current .htaccess file considers to be the Document_Root (home page directory) for the site. Awful security problems would ensue if mod_rewrite could be used to access above the normally-HTTP-accessible directory level.

As a result, it's likely you may need to resort to using *nix symlinks (symbolic links) to make it appear that the resources you wish to share reside within the current Document_Root. Or alternately, if you have access to httpd.conf, you may be able to use Apache's Alias and ScriptAlias directives to accomplish much the same thing. This would be your only alternative if you've got Apache running on Windows, since Windows doesn't support symlinks.

Jim

g1smd

9:42 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why can't you just edit the site configuration so that domain2 points directly at the folder that you require it to be?