You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jennifer Zelazny <we...@calgb.org> on 2004/07/15 17:57:58 UTC
Re: [users@httpd] Redirect domain.com to www.domain.com
Hello. Redirect revisited: I have never been able to get the Redirect
to work, and what I need to do seems like it should be simple. This
time around, I am including part of my conf file as well as the exact
error I am getting to hopefully make my error stick out.
My conf file is taken right from the example:
http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
<VirtualHost *:80>
ServerName www.domain.org
ServerAlias domain.org
Redirect permanent / http://www.domain.org/
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain.org
ServerAdmin web@domain.org
DocumentRoot /Volumes/www/Sites/domain.org/documents
</VirtualHost>
The error I receive when trying to access http://domain.org:
"Too many redirects occurred trying to open “http://www.calgb2.org/”.
This might occur if you open a page that is redirected to open another
page which then is redirected to open the original page."
I am completely stumped.
Thanks in advance,
Jen
On Apr 21, 2004, at 8:10 AM, Joshua Slive wrote:
>
>
>
> On Wed, 21 Apr 2004, Boyle Owen wrote:
>>> From: Jennifer Zelazny [mailto:web@calgb.org]
>>>
>>> Hello. I have Apache 1.3.29 running on an OS X Server and would like
>>> to have all incoming requests for domain.com to be redirected to
>>> www.domain.com. I attempted to do this by setting up
>>> RedirectPermanent
>>> http://domain.com http://www.domain.com and had AllowOverride set to
>>> FileInfo but my requests for domain.com are not redirected.
>>> Any thoughts would be greatly appreciated.
>>
>> You don't need to redirect - just use:
>>
>> ServerName www.domain.com
>> ServerAlias domain.com
>
> You don't *need* to, but it can sometimes be a good idea to make sure
> your
> content has unique URLs. For instructions on how to do it, see:
>
> http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
>
> Joshua.
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Redirect domain.com to www.domain.com
Posted by Jennifer Zelazny <we...@calgb.org>.
Thank you so much, it works!!
Jen
On Jul 15, 2004, at 11:07 AM, Tim Burden wrote:
> Well of course, you're telling it to redirect to itself. Over and over
> again.
>
> Try this:
>
> <VirtualHost *:80>
> ServerName www.domain.org
> ServerAdmin web@domain.org
> DocumentRoot /Volumes/www/Sites/domain.org/documents
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName domain.org
> Redirect permanent / http://www.domain.org/
> </VirtualHost>
>
>
>
> ----- Original Message -----
> From: "Jennifer Zelazny" <we...@calgb.org>
> To: <us...@httpd.apache.org>
> Sent: Thursday, July 15, 2004 11:57 AM
> Subject: Re: [users@httpd] Redirect domain.com to www.domain.com
>
>
> Hello. Redirect revisited: I have never been able to get the Redirect
> to work, and what I need to do seems like it should be simple. This
> time around, I am including part of my conf file as well as the exact
> error I am getting to hopefully make my error stick out.
>
> My conf file is taken right from the example:
> http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
>
> <VirtualHost *:80>
> ServerName www.domain.org
> ServerAlias domain.org
> Redirect permanent / http://www.domain.org/
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName www.domain.org
> ServerAdmin web@domain.org
> DocumentRoot /Volumes/www/Sites/domain.org/documents
> </VirtualHost>
>
> The error I receive when trying to access http://domain.org:
> "Too many redirects occurred trying to open “http://www.calgb2.org/”.
> This might occur if you open a page that is redirected to open another
> page which then is redirected to open the original page."
>
> I am completely stumped.
> Thanks in advance,
> Jen
>
>
>
> On Apr 21, 2004, at 8:10 AM, Joshua Slive wrote:
>
>>
>>
>>
>> On Wed, 21 Apr 2004, Boyle Owen wrote:
>>>> From: Jennifer Zelazny [mailto:web@calgb.org]
>>>>
>>>> Hello. I have Apache 1.3.29 running on an OS X Server and would
>>>> like
>>>> to have all incoming requests for domain.com to be redirected to
>>>> www.domain.com. I attempted to do this by setting up
>>>> RedirectPermanent
>>>> http://domain.com http://www.domain.com and had AllowOverride set to
>>>> FileInfo but my requests for domain.com are not redirected.
>>>> Any thoughts would be greatly appreciated.
>>>
>>> You don't need to redirect - just use:
>>>
>>> ServerName www.domain.com
>>> ServerAlias domain.com
>>
>> You don't *need* to, but it can sometimes be a good idea to make sure
>> your
>> content has unique URLs. For instructions on how to do it, see:
>>
>> http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
>>
>> Joshua.
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Redirect domain.com to www.domain.com
Posted by Tim Burden <ti...@burden.ca>.
Well of course, you're telling it to redirect to itself. Over and over
again.
Try this:
<VirtualHost *:80>
ServerName www.domain.org
ServerAdmin web@domain.org
DocumentRoot /Volumes/www/Sites/domain.org/documents
</VirtualHost>
<VirtualHost *:80>
ServerName domain.org
Redirect permanent / http://www.domain.org/
</VirtualHost>
----- Original Message -----
From: "Jennifer Zelazny" <we...@calgb.org>
To: <us...@httpd.apache.org>
Sent: Thursday, July 15, 2004 11:57 AM
Subject: Re: [users@httpd] Redirect domain.com to www.domain.com
Hello. Redirect revisited: I have never been able to get the Redirect
to work, and what I need to do seems like it should be simple. This
time around, I am including part of my conf file as well as the exact
error I am getting to hopefully make my error stick out.
My conf file is taken right from the example:
http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
<VirtualHost *:80>
ServerName www.domain.org
ServerAlias domain.org
Redirect permanent / http://www.domain.org/
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain.org
ServerAdmin web@domain.org
DocumentRoot /Volumes/www/Sites/domain.org/documents
</VirtualHost>
The error I receive when trying to access http://domain.org:
"Too many redirects occurred trying to open “http://www.calgb2.org/”.
This might occur if you open a page that is redirected to open another
page which then is redirected to open the original page."
I am completely stumped.
Thanks in advance,
Jen
On Apr 21, 2004, at 8:10 AM, Joshua Slive wrote:
>
>
>
> On Wed, 21 Apr 2004, Boyle Owen wrote:
>>> From: Jennifer Zelazny [mailto:web@calgb.org]
>>>
>>> Hello. I have Apache 1.3.29 running on an OS X Server and would like
>>> to have all incoming requests for domain.com to be redirected to
>>> www.domain.com. I attempted to do this by setting up
>>> RedirectPermanent
>>> http://domain.com http://www.domain.com and had AllowOverride set to
>>> FileInfo but my requests for domain.com are not redirected.
>>> Any thoughts would be greatly appreciated.
>>
>> You don't need to redirect - just use:
>>
>> ServerName www.domain.com
>> ServerAlias domain.com
>
> You don't *need* to, but it can sometimes be a good idea to make sure
> your
> content has unique URLs. For instructions on how to do it, see:
>
> http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
>
> Joshua.
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org