rewrite multiple domains to one

This is a discussion on rewrite multiple domains to one within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm not sure of a good way to ask the question that I would like answered, so instead I'...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-11-2006
unumism
 
Posts: n/a
Default rewrite multiple domains to one

I'm not sure of a good way to ask the question that I would like
answered, so instead I'll try to give an example of what I'd like to
do.

Imagine I own 3 domain names, one for each product that I sell.
http://product1.com
http://product2.com
http://product3.com

Within these domains I also have subdomains for each product, relating
to it's use.
http://sports.product1.com
http://industry.product1.com
http://games.product2.com
http://blahblahblah.product2.com
http://names.product3.com
etc.

What I would like to know is, is it possible with mod_rewrite to have
all of these urls rewritten to one domain? IOW, the first example
would become something like
http://www.diffhost.com/product1/sports
or
http://www.diffhost.com?host=product1&subdomain=sports
while the second example would become
http://www.diffhost.com/product1/industry
or
http://www.diffhost.com?host=product...omain=industry
the third would become
http://www.diffhost.com/product2/games
or
http://www.diffhost.com?host=product2&subdomain=games
etc.? I hope I've explained this well enough. Let me know if I
haven't. If anyone knows if this is possible, I'd love to hear it.

Thanks

  #2 (permalink)  
Old 05-12-2006
Robert Ionescu
 
Posts: n/a
Default Re: rewrite multiple domains to one

Do you have access to the httpd.conf so that you can use RewriteRules
e.g. inside of your virtual host container?

--
Robert
  #3 (permalink)  
Old 05-15-2006
unumism
 
Posts: n/a
Default Re: rewrite multiple domains to one

Yes, it's our own server/s and I have full access to change anything I
want.

  #4 (permalink)  
Old 05-15-2006
David Cary Hart
 
Posts: n/a
Default Re: rewrite multiple domains to one

On 15 May 2006 08:20:02 -0700, "unumism" <lewdog23@hotmail.com>
opined:
> Yes, it's our own server/s and I have full access to change
> anything I want.
>

RedirectMatch is the simplest method.
In the <directory>
RedirectMatch (.*) http://domain.tld

--
Displayed Email Address is a SPAM TRAP
Our DNSRBL - Eliminate Spam: http://www.TQMcube.com
Multi-RBL Check: http://www.TQMcube.com/rblcheck.php
The Dirty Dozen Spammiest Ranges: http://tqmcube.com/dirty12.php
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0