You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2013/04/05 19:34:03 UTC

[users@httpd] Apache Not Redirecting

Apache 2.2.12 on sles11 sp2. We are trying to get users to access http://share.domain.com. Apache has a VirtualHost file with redirectmatch ^/$ http://share.domain.com/share
Apache seems to not be redirecting this. Here is http://share.domain.com results:

GET / HTTP/1.1
Host: share.domain.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)
Gecko/20100101 Firefox/20.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive

HTTP/1.1 200 OK
Date: Fri, 05 Apr 2013 13:46:39 GMT
Server: Apache/2.2.12 (Linux/SUSE)
X-Powered-By: PHP/5.2.14
X-Pingback:http://clientblog.com/xmlrpc.php
Content-Length: 6389
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

Any ideas why apache is not performing the redirectmatch?

Sent from my iPhone

Re: [users@httpd] Apache Not Redirecting

Posted by Chris Arnold <ca...@electrichendrix.com>.
----- Original Message -----

From: "Chris" 
To: users@httpd.apache.org 
Sent: Friday, April 5, 2013 1:34:03 PM 
Subject: [users@httpd] Apache Not Redirecting 

>Apache 2.2.12 on sles11 sp2. We are trying to get users to access http://share.domain.com . Apache has a >VirtualHost file with redirectmatch ^/$ http://share.domain.com/share 
>Apache seems to not be redirecting this. Here is http://share.domain.com results: 
> 
>Any ideas why apache is not performing the redirectmatch? 

So, i am wondering if i can do a http_host regex? Something like: 
<VirtualHost *:80> 
ServerName share.* 

JkMount /share|/* worker1 
RewriteCond %{HTTP_HOST} ^share\. 
RedirectMatch ^/$ http://share.{HTTP_HOST}/share/ 

</VirtualHost> 

Would that accomplish anydomain? We will have many clients accessing the same content at http://share.theirdomain.tld and we need it to redirect to http://share.theirdomain.tld/share.