|
#1
|
|||
|
|||
|
I've searched for this in the forums, but didn't find a solution that worked.
I'm on a Baby hosting plan and want to host multiple domains on this space: primarydomain.com domain2.com domain3.com Rather than have my primary domain served from the /public_html/ folder, I want it to be served from this folder: /public_html/primarydomain.com/ And similarly, I want the other add-on domain to be served from their own sub folders: /public_html/primarydomain.com/ /public_html/domain2.com/ /public_html/domain3.com/ I'm trying to do this using the .htaccess file in /public_html/, and here is what I've tried so far: Method 1: Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?spaddiction.ca$
RewriteRule ^(/)?$ spaddiction.ca [L]
http://www.primarydomain.com/primarydomain.com/ Of course, I want it to read: http://www.primarydomain.com/ Method 2: Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?primarydomain.com$
RewriteCond %{REQUEST_URI} !^/primarydomain.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /primarydomain.com/$1
RewriteCond %{HTTP_HOST} ^(www.)?primarydomain.com$
RewriteRule ^(/)?$ primarydomain.com/index.htm [L]
If I access the site using the IP address and the sub-folder, everything displays fine: E.g. http://<server-ip-address>/~username/primarydomain.com/ Any ideas on how to modify the .htaccess to fix these problems? |
|
#2
|
|||
|
|||
|
Sorry, my examples were mixed up. Wherever I wrote spaddiction.ca I meant to write primarydomain.com
|
|
#3
|
|||
|
|||
|
In your code for method 2 replace % with %
Anatol |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to redirect a subfolder | LatinCrib | Shared Hosting Support | 4 | 09-10-2010 04:37 PM |
| addon subfolder redirect | simone | Shared Hosting Support | 1 | 08-20-2010 05:39 AM |
| addon subfolder redirect | simone | Web Hosting Services | 0 | 08-19-2010 05:48 AM |
| Redirect to subfolder | tommo | Suggestions | 7 | 01-02-2008 10:02 AM |
| redirect domain root to www.mydomain.com/subfolder/ | marchw | Shared Hosting Support | 2 | 07-06-2006 07:03 PM |
All times are GMT -5. The time now is 03:06 AM.









