Strange redirect issue
am 29.10.2009 10:22:38 von phiroc
Hi,
the network administrator at my company has created a domain name, called intranetalias.company.com,
which is an alias of a domain name, which I will call intranet.company.com in this thread.
When I curl -IL (display header and follow redirect) intranetalias.company.com/w,
the following lines are displayed:
bash-3.2$ curl -IL intranetalias.company.com/w
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
Location: http://intranet.company.com/w/
....
HTTP/1.1 302 Found
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
X-Powered-By: PHP/5.3.0
Location: http://intranet.company.com/w/install.php
Cache-Control: no-cache
....
Apache redirects curl to intranet.company.com.
I have created a similar environment on a test server. However, Apache seems to behave differently:
bash-3.2$ curl -IL test.company.com/drupal6
[ test.company.com is an alias of mydevelopmentsite.company.com ]
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:41:30 GMT
Server: Apache/2.2.8
Location: http://test.company.com/drupal6/
....
HTTP/1.1 200 OK
Date: Thu, 29 Oct 2009 08:52:45 GMT
Server: Apache/2.2.8 (Unix) ...
X-Powered-By: PHP/5.2....
Set-Cookie: SESS7c5f225c10fa9a20232394a61e7275f2=5c578a0b9e7274a72de7626 4189a605c;
expires=Sat, 21-Nov-2009 12:26:05 GMT; path=/; domain=.test.company.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Thu, 29 Oct 2009 08:52:45 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8
In this case, Apache redirects curl to the alias domain name, test.company.com
instead of the real domain name (mydevelopmentsite.company.com).
Why are the two Apaches behaving differently?
Please note that there aren't any redirect or URL rewriting directives in the Apache's
respective configuration files which could cause that behavior.
Any help with this issue would be much appreciated.
p
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Strange redirect issue [solved]
am 29.10.2009 10:35:16 von phiroc
The issue was due to a commented-out directive in the w directory's .htacce=
ss file:
# Modify the RewriteBase if you are using Drupal in a subdirectory or in =
a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
RewriteBase /w
Uncommenting the RewriteBase directive above solved the problem
p
----- Mail Original -----
De: phiroc@free.fr
Ã: users@httpd.apache.org
Envoyé: Jeudi 29 Octobre 2009 10:22:38 GMT +01:00 Amsterdam / Berlin /=
Berne / Rome / Stockholm / Vienne
Objet: [users@httpd] Strange redirect issue
Hi,
the network administrator at my company has created a domain name, called i=
ntranetalias.company.com,
which is an alias of a domain name, which I will call intranet.company.com =
in this thread.
When I curl -IL (display header and follow redirect) intranetalias.company.=
com/w,=20
the following lines are displayed:
bash-3.2$ curl -IL intranetalias.company.com/w
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
Location: http://intranet.company.com/w/
....
HTTP/1.1 302 Found
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
X-Powered-By: PHP/5.3.0
Location: http://intranet.company.com/w/install.php
Cache-Control: no-cache
....
Apache redirects curl to intranet.company.com.
I have created a similar environment on a test server. However, Apache seem=
s to behave differently:=20
bash-3.2$ curl -IL test.company.com/drupal6
[ test.company.com is an alias of mydevelopmentsite.company.com ]
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:41:30 GMT
Server: Apache/2.2.8
Location: http://test.company.com/drupal6/
....
HTTP/1.1 200 OK
Date: Thu, 29 Oct 2009 08:52:45 GMT
Server: Apache/2.2.8 (Unix) ...
X-Powered-By: PHP/5.2....
Set-Cookie: SESS7c5f225c10fa9a20232394a61e7275f2=3D5c578a0b9e7274a72de76 264=
189a605c;
expires=3DSat, 21-Nov-2009 12:26:05 GMT; path=3D/; domain=3D.test.company.=
com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Thu, 29 Oct 2009 08:52:45 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=3D0, pre-check=3D0
Connection: close
Content-Type: text/html; charset=3Dutf-8
In this case, Apache redirects curl to the alias domain name, test.company.=
com
instead of the real domain name (mydevelopmentsite.company.com).
Why are the two Apaches behaving differently?
Please note that there aren't any redirect or URL rewriting directives in t=
he Apache's=20
respective configuration files which could cause that behavior.
Any help with this issue would be much appreciated.
p
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 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