Mod_rewrite and url masking

Using a single web hosting account to host multiple sites

Mod_rewrite and url masking

Postby ule » Thu Apr 26, 2007 1:09 pm

I'm sure this issue comes a lot, but couldn't find a solution till now on the forum, so I have to ask.

We have an apache server were one domain is running www.tld.com.
We have 70 subsites: www.tld.com/car or www.tld.com/horse
this path are already rewrited in a .htacces file, so it goes to
www.tld.com/car -> www.tld.com/index.php?id=76

Now someone told me, we should also have car.tld.com or horse.tld.com subdomains. We can redirect this subdomains to the right page, but we would like to have to mask the path.

so if someone put the subdomain car.tld.com, shouldn't see www.tld.com/index.php?id=76&..... Just the subdomain.

1. Is there a solution?
2. If yes. What are the thing we have to take care?

Hope to find a solution.
Thank you!
ule
 
Posts: 3
Joined: Wed Dec 06, 2006 8:48 am

Postby richardk » Thu Apr 26, 2007 2:56 pm

It is possible. You would need DNS for the sub domains. The sub domains would need to go to your main document root.

And i'll need to see the current mod_rewrite.
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 99 guests

cron