View Full Version : Directory Structure for base site.
02-22-2006, 05:34 PM
When I add an Add-On domain, it asks me what directory I want to create for it. Lets say I have 3 Add-On domains ... Site1, Site2, Site3 ... the directory structure looks something like this ...
So when a user goes to www.site1.com they get directed to ...
The problem I have is that I want the main site to also reside in a directory. That way the public_html is perhaps a bit better organized and clear.
Any suggestions on how to make the main site go directly to sub-directory instead of public_html ??
02-22-2006, 07:15 PM
Under public_html, create the subdomain or folder that you want your main site in. Then you'll have:
Now create a .htaccess file if there isn't one already. Insert the line:
Redirect http://www.yourdomain.com http://www.yourdomain.com/main/
Upload this in ASCII to your public_html folder.
Anyone visiting your site at http://www.yourdomain.com will be redirected to http://www.yourdomain.com/main/
02-23-2006, 04:53 PM
Thanks for the pointers, something I was doing was not allowing this to work ... I think. (hehe)
I did some testing on an Add-On domain too.
In the public_html directory I edited the .htaccess file to include ...
Redirect http://www.digitalminion.com http://www.digitalminion.com/forums
Thsi didn't work. So I made the same change to the Add-On directory of ...
I made the same changes above and nothing. :(
So I took your hint and did some searching on .htaccess on the web. The changes that ended up working were ...
In public/html/dm to .htaccess ...
Since I do not have a index.html page in the main directory, this points the looking for that to the forums. A cheap way I guess of making the forums my homepage.
Again, thanks for pointing me in the right direction.
02-23-2006, 05:26 PM
Glad you found a way to do it. I'll put that in my notes for future use.
02-24-2006, 01:06 AM
This sounds very similiar to what I am asking in http://www.bluehostforum.com/showthread.php?t=50
Only other thing...can you see from the browser's point of view that you are being redirected? Does that change the URL in the location bar?
02-24-2006, 08:14 AM
Sounds like you need to use mod_rewrite. Here's a nice cheat sheet:
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.