Redirect domain.com to www.domain.com

This is a discussion on Redirect domain.com to www.domain.com within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, what would be the best practice to redirect all requests to http://domain.com to http://www.doamin.com ? ...


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 08-16-2005
Peter Holm
 
Posts: n/a
Default Redirect domain.com to www.domain.com

Hi,

what would be the best practice to redirect all requests to

http://domain.com

to http://www.doamin.com ?

Is it possible to do this WITHOUT a distinct VHost for domain.com ?

(I donīt think so)


Thanks for your attention,
Peter
  #2 (permalink)  
Old 08-17-2005
mr_scary
 
Posts: n/a
Default Re: Redirect domain.com to www.domain.com

http://httpd.apache.org/docs/1.3/misc/rewriteguide.html

  #3 (permalink)  
Old 08-17-2005
Thomas Krieger
 
Posts: n/a
Default Re: Redirect domain.com to www.domain.com

Hi,

I think you have defined a vhost for www.domain.com. Add a ServerAlias
domain.com to the vhost. And don't forget to configure your dns that it
knows about domain.com.

Bye

Thomas

Peter Holm wrote:

> Hi,
>
> what would be the best practice to redirect all requests to
>
> http://domain.com
>
> to http://www.doamin.com ?
>
> Is it possible to do this WITHOUT a distinct VHost for domain.com ?
>
> (I don?t think so)
>
>
> Thanks for your attention,
> Peter


  #4 (permalink)  
Old 08-22-2005
Peter Holm
 
Posts: n/a
Default Re: Redirect domain.com to www.domain.com

On Wed, 17 Aug 2005 14:07:26 +0200, Thomas Krieger
<tom@tom-krieger.de> wrote:

>I think you have defined a vhost for www.domain.com. Add a ServerAlias
>domain.com to the vhost. And don't forget to configure your dns that it
>knows about domain.com.


ok, i know this, buit this has a disadvantage, that people will have
domain.com in their browser address line, what gives again problems if
you want to swith parts of the site to https:// and you have a cert
only for www.domain.com

So what I wnat, is a redirect to www.domain.com on every request that
comes to domain.com. domain.com should NOT exist as a seperate vhost.

Hope, i could explain the problem...

Thaks for your attention,
Peter
 
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 04:58 PM.


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