multiple domains and subdomains with one vhost account!

Using a single web hosting account to host multiple sites

multiple domains and subdomains with one vhost account!

Postby motus123 » Thu Jul 13, 2006 5:20 pm

ok...
here's my dilemna...

i have 4 domains...
for example...
first.net
first.com
second.com
third.com

first.net is the main domain on my shared hosting account...

i need a set of rewrite rules that do the following....

first.com goes silently to first.net/first.com/
second.com goes silently to first.net/second.com/
third.com goes silently to first.net/second.com/

ok... now... subdomains...

gallery.first.net goes to first.net/gallery/
gallery.first.com goes to first.net/first.com/gallery/
gallery.second.com and gallery.third.com go to first.net/second.com/gallery/

info.*.* go to first.net/info/

all i've been able to figure out is how to get first.com to go to first.net/first.com/ as follows:

Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?first.net
RewriteCond %{REQUEST_URI} !^/first\.com/
RewriteRule ^(.*)$ /first\.com/$1 [L]


the rest of it is overwhelming for my small brain. please help...

:D
motus123
 
Posts: 1
Joined: Thu Jul 13, 2006 5:04 pm

Postby richardk » Fri Jul 14, 2006 4:40 am

richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby BADGROOVY » Fri Jul 14, 2006 2:46 pm

richardk wrote:http://www.doriat.com/mod_rewrite508.html



LOL :o
BADGROOVY
 
Posts: 6
Joined: Tue Jul 11, 2006 7:47 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 70 guests

cron