Re-writing a parked domain to a sub-dir.

Using a single web hosting account to host multiple sites

Re-writing a parked domain to a sub-dir.

Postby Sherri » Sun Feb 20, 2005 4:17 pm

Hi everyone. This forum seems really interesting!

I have a problem that might be easy to anyone who knows more about mod rewrite than I do.

I have a domain parked to my current one. Let's call it foo.com

I want any url that contains foo.com to redirect to a subdirectory on my main domain (bar.com)

Ex:
www.foo.com/ goes to: www.bar.com/foo/
and
www.foo.com/anything.php?blah=1 goes to: www.bar.com/foo/anything.php?blah=1

etc.

Does this make sense? I appreciate any help! Thanks!
Sherri
 

Host subdir

Postby Caterham » Mon Feb 21, 2005 6:58 am

domain parked to my current one
=content is the same, direct local access
Code: Select all
RewriteEngine On
RewriteRule !^foo - [C]
RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com
RewriteRule ^(.*)$ /foo/$1 [L]
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 104 guests

cron