sub1.domain.com, sub2.domain.com --> domain.com/sub ???

Using a single web hosting account to host multiple sites

sub1.domain.com, sub2.domain.com --> domain.com/sub ???

Postby phucvd » Mon Jul 24, 2006 12:32 am

Hi all,
I've read this forum, I did like your documents but I couldn't make it works, can you help me rewrite

http://www1.domain.com --> http://www.domain.com/sub
http://www2.domain.com --> http://www.domain.com/sub
http://www3.domain.com --> http://www.domain.com/sub

thank you all
phucvd
 
Posts: 2
Joined: Thu Mar 17, 2005 1:06 am

Postby richardk » Mon Jul 24, 2006 6:15 am

You have the DNS setup right? All the domains point to the same document root, right?

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www[123]\.DOMAIN$ [NC]
RewriteRule !^sub(/.*)?$ /sub%{REQUEST_URI} [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 32 guests

cron