View Full Version : how to set a domains main folder?????
StarDruid
8-9-03, 08:52 AM
I just got started here and was wonder if there is a way to point my domain to something other then the htdocs folder? I plan to have subdomains and don't want their folders to be shows threw the main domain as well as them cultering up the Main sites directory when I FTP in.
Any advice?
Croc Hunter
8-9-03, 09:03 AM
You can point to another folder with a .htacess file
See www.help.powweb.com or
http://help.powweb.com/faqs/htaccess.php
Ed
http://help.powweb.com/faqs/subdomain.php
StarDruid
8-9-03, 10:06 AM
so use code like you would for a second domian but use your first domain instead? So basicly this?
RewriteCond %{HTTP_HOST} gentlerainofserenity.com <-my domain
RewriteCond %{REQUEST_URI} !main/
RewriteRule ^(.*)$ main/$1 [L]
Edit, but waht about sub domains, won't they have to be in their respective domians directory, so all of gentlerainofserenity.com's subdomains will ahve to be in main/ ?
Yes, use code like that...
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} sub.gentlerainofserenity.com
RewriteCond %{REQUEST_URI} !subdirectory/
RewriteRule ^(.*)$ subdirectory/$1 [L]
RewriteCond %{HTTP_HOST} gentlerainofserenity.com
RewriteCond %{REQUEST_URI} !main/
RewriteRule ^(.*)$ main/$1 [L]
Yes, the subdomains for gentlerainofserenity.com would go in main/subdirectory
I hope that's what you wanted to do...
But keep on mind that if you redirect your domain name to a subdirectory, then you will not be able to get to anything in the htdocs folder. So, for example, your webstats folder will not be accessible from the net.
Also, as already stated, your subdomain directories must be at a level below your domain name anyway. So your level of clutter will be the same, you have just moved it from htdocs to htdocs/subdirectory. For example -
domain.com -> htdocs/subdir1
sub.domain.com -> htdocs/subdir2
the above DOES NOT WORK. And I think that is what you are asking for, if I read your first post correctly.
StarDruid
8-9-03, 08:37 PM
lovely. Guess I keep it in my primary folder then. I just put all my subdomains in a folder called subdomains.
Don't have any real use for webstats right now but might later.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.