Hi all, a little off topic, but was wondering what the best way is to re-write incoming requests so that they all end up at the same domain. For example, if I had: my_domain.net my_domain.com my_domain.org Whats the best way to map/redirect all of these to www.my_domain.com ? I know its possible, just not sure what to add for rules/virtual hosts in my apache config. Thanks for the help! -Nick
Wouldn''t this be a simple dns config? Since they are different domains just have all the domains point to the same ip address of the server. ---------------------------------------------------------------------------------------------------- What''s an Intel chip doing in a Mac? A whole lor more that it''s ever done in a PC. My Digital Life - http://scottwalter.com/blog Pro:Blog - http://scottwalter.com/problog ----- Original Message ---- From: Nick Stuart <nicholas.stuart@gmail.com> To: rails@lists.rubyonrails.org Sent: Wednesday, February 22, 2006 8:35:29 AM Subject: [Rails] [OT] Apache rewrite stuff... Hi all, a little off topic, but was wondering what the best way is to re-write incoming requests so that they all end up at the same domain. For example, if I had: my_domain.net my_domain.com my_domain.org Whats the best way to map/redirect all of these to www.my_domain.com ? I know its possible, just not sure what to add for rules/virtual hosts in my apache config. Thanks for the help! -Nick _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060222/e4e548b3/attachment.html
Well currently they all do point to the same IP address, and it works. My point was though to have the URL re-written to show a constant address no matter how they come to the site. -Nick On 2/22/06, Scott Walter <tx_scottwalter@yahoo.com> wrote:> Wouldn''t this be a simple dns config? Since they are different domains just > have all the domains point to the same ip address of the server. > ---------------------------------------------------------------------------------------------------- > What''s an Intel chip doing in a Mac? A whole lor more > that it''s ever done in a PC. > > My Digital Life - http://scottwalter.com/blog > Pro:Blog - http://scottwalter.com/problog > > > ----- Original Message ---- > From: Nick Stuart <nicholas.stuart@gmail.com> > To: rails@lists.rubyonrails.org > Sent: Wednesday, February 22, 2006 8:35:29 AM > Subject: [Rails] [OT] Apache rewrite stuff... > > > Hi all, a little off topic, but was wondering what the best way is to > re-write incoming requests so that they all end up at the same domain. > For example, if I had: > my_domain.net > my_domain.com > my_domain.org > > Whats the best way to map/redirect all of these to > www.my_domain.com > > ? > > I know its possible, just not sure what to add for rules/virtual hosts > in my apache config. > > Thanks for the help! > -Nick > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Am Mittwoch, den 22.02.2006, 09:35 -0500 schrieb Nick Stuart:> Hi all, a little off topic, but was wondering what the best way is to > re-write incoming requests so that they all end up at the same domain. > For example, if I had: > my_domain.net > my_domain.com > my_domain.org > > Whats the best way to map/redirect all of these to > www.my_domain.comRewriteCond %{HTTP_HOST} !^(.*)my_domain\.com$ [NC] RewriteRule (.*) http://%1my_domain.com/$1 [R] -- Norman Timmler http://blog.inlet-media.de
The entire world should just instantaneously forget that the "www." aberration ever existed! :-) b Nick Stuart wrote:> Well currently they all do point to the same IP address, and it works. > My point was though to have the URL re-written to show a constant > address no matter how they come to the site. > > -Nick > > On 2/22/06, Scott Walter <tx_scottwalter@yahoo.com> wrote: > >>Wouldn''t this be a simple dns config? Since they are different domains just >>have all the domains point to the same ip address of the server. >>---------------------------------------------------------------------------------------------------- >>What''s an Intel chip doing in a Mac? A whole lor more >>that it''s ever done in a PC. >> >>My Digital Life - http://scottwalter.com/blog >>Pro:Blog - http://scottwalter.com/problog >> >> >>----- Original Message ---- >>From: Nick Stuart <nicholas.stuart@gmail.com> >>To: rails@lists.rubyonrails.org >>Sent: Wednesday, February 22, 2006 8:35:29 AM >>Subject: [Rails] [OT] Apache rewrite stuff... >> >> >>Hi all, a little off topic, but was wondering what the best way is to >>re-write incoming requests so that they all end up at the same domain. >>For example, if I had: >>my_domain.net >>my_domain.com >>my_domain.org >> >>Whats the best way to map/redirect all of these to >>www.my_domain.com >> >>? >> >>I know its possible, just not sure what to add for rules/virtual hosts >>in my apache config. >> >>Thanks for the help! >>-Nick >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Thanks, I''ll give it a shot! On 2/22/06, Norman Timmler <lists@inlet-media.de> wrote:> Am Mittwoch, den 22.02.2006, 09:35 -0500 schrieb Nick Stuart: > > Hi all, a little off topic, but was wondering what the best way is to > > re-write incoming requests so that they all end up at the same domain. > > For example, if I had: > > my_domain.net > > my_domain.com > > my_domain.org > > > > Whats the best way to map/redirect all of these to > > www.my_domain.com > > RewriteCond %{HTTP_HOST} !^(.*)my_domain\.com$ [NC] > RewriteRule (.*) http://%1my_domain.com/$1 [R] > > -- > Norman Timmler > > http://blog.inlet-media.de > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >