You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jo...@LDHEnergy.com on 2010/05/05 22:46:34 UTC

[users@httpd] Redirect question

I have checked the archives since I am sure this has been asked before but 
can not find an answer.

I have an application running on a server at:
http://server/application

My user wants me to set up so that 
http://application
will redirect to:
http://server/application

I have DNS set up and now if I go to:
http://application/application
the correct page is displayed. I just can not seem to get
http://application
to go to the right place.

I have tried to use Redirect:
Redirect permanent / http://server/application
but I then get:
Firefox has detected that the server is redirecting the request for this 
address in a way that will never complete.

What am I doing wrong?

Thanks,
John

RE: [users@httpd] Redirect question

Posted by Jo...@LDHEnergy.com.
Priya,
I tried:
Redirect permanent /index.jsp http://server/app/index.jsp
and definitely got the loop you are referring to. The URL came out as:
http://server/appappappappappappappappappappappappappappapp

I also tried the following with the same result:

Redirect permanent / http://server/app/index.jsp
Redirect permanent /* http://server/app/index.jsp
Redirect permanent /*/ http://server/app/index.jsp

Is there any other info that I can give that would help?

Thanks,
John





I think the redirect rule entered into a loop and unable  to process
 
Did  you try 
Redirect permanent /application  http://server/application
 
Does /application internally call any JSP before loading the page?
 
For eg: in or env, we have a /*, that internally calls a index.jsp and 
then index.jsp internally calls login.jsp
 
I had to say
 
 Redirect /*/loginjsp  https://example.com to make it work.
 
Thanks
Priya
 
From: John.C.Kennedy@LDHEnergy.com [mailto:John.C.Kennedy@LDHEnergy.com] 
Sent: Wednesday, May 05, 2010 1:47 PM
To: users@httpd.apache.org
Subject: [users@httpd] Redirect question
 

I have checked the archives since I am sure this has been asked before but 
can not find an answer. 

I have an application running on a server at: 
http://server/application 

My user wants me to set up so that 
http://application 
will redirect to: 
http://server/application 

I have DNS set up and now if I go to: 
http://application/application 
the correct page is displayed. I just can not seem to get 
http://application 
to go to the right place. 

I have tried to use Redirect: 
Redirect permanent / http://server/application 
but I then get: 
Firefox has detected that the server is redirecting the request for this 
address in a way that will never complete. 

What am I doing wrong? 

Thanks, 
John

RE: [users@httpd] Redirect question

Posted by "Priya Vadlakonda (Contractor)" <Pr...@ucop.edu>.
And I assume you cleared cache / enabled cookies to make sure this isn't
caused by firefox itself.

 

From: Priya Vadlakonda (Contractor) [mailto:Priya.Vadlakonda@ucop.edu] 
Sent: Wednesday, May 05, 2010 2:02 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Redirect question

 

I think the redirect rule entered into a loop and unable  to process

 

Did  you try 

Redirect permanent /application  http://server/application

 

Does /application internally call any JSP before loading the page?

 

For eg: in or env, we have a /*, that internally calls a index.jsp and
then index.jsp internally calls login.jsp

 

I had to say

 

 Redirect /*/loginjsp  https://example.com to make it work.

 

Thanks

Priya

 

From: John.C.Kennedy@LDHEnergy.com [mailto:John.C.Kennedy@LDHEnergy.com]

Sent: Wednesday, May 05, 2010 1:47 PM
To: users@httpd.apache.org
Subject: [users@httpd] Redirect question

 


I have checked the archives since I am sure this has been asked before
but can not find an answer. 

I have an application running on a server at: 
http://server/application <http://server/application>  

My user wants me to set up so that 
http://application <http://application/>  
will redirect to: 
http://server/application <http://server/application>  

I have DNS set up and now if I go to: 
http://application/application <http://application/application>  
the correct page is displayed. I just can not seem to get 
http://application <http://application/>  
to go to the right place. 

I have tried to use Redirect: 
Redirect permanent / http://server/application
<http://server/application>  
but I then get: 
Firefox has detected that the server is redirecting the request for this
address in a way that will never complete. 

What am I doing wrong? 

Thanks, 
John


RE: [users@httpd] Redirect question

Posted by "Priya Vadlakonda (Contractor)" <Pr...@ucop.edu>.
I think the redirect rule entered into a loop and unable  to process

 

Did  you try 

Redirect permanent /application  http://server/application

 

Does /application internally call any JSP before loading the page?

 

For eg: in or env, we have a /*, that internally calls a index.jsp and
then index.jsp internally calls login.jsp

 

I had to say

 

 Redirect /*/loginjsp  https://example.com to make it work.

 

Thanks

Priya

 

From: John.C.Kennedy@LDHEnergy.com [mailto:John.C.Kennedy@LDHEnergy.com]

Sent: Wednesday, May 05, 2010 1:47 PM
To: users@httpd.apache.org
Subject: [users@httpd] Redirect question

 


I have checked the archives since I am sure this has been asked before
but can not find an answer. 

I have an application running on a server at: 
http://server/application <http://server/application>  

My user wants me to set up so that 
http://application <http://application/>  
will redirect to: 
http://server/application <http://server/application>  

I have DNS set up and now if I go to: 
http://application/application <http://application/application>  
the correct page is displayed. I just can not seem to get 
http://application <http://application/>  
to go to the right place. 

I have tried to use Redirect: 
Redirect permanent / http://server/application
<http://server/application>  
but I then get: 
Firefox has detected that the server is redirecting the request for this
address in a way that will never complete. 

What am I doing wrong? 

Thanks, 
John


Re: [users@httpd] Redirect question

Posted by Jo...@LDHEnergy.com.
At 16:46 -0400 5/5/10, John.C.Kennedy@LDHEnergy.com wrote:
I have an application running on a server at:
http://server/application

My user wants me to set up so that
http://application
will redirect to:
http://server/application

I have DNS set up and now if I go to:
http://application/application
the correct page is displayed. I just can not seem to get
http://application
to go to the right place.

I have tried to use Redirect:
Redirect permanent / http://server/application
but I then get:
Firefox has detected that the server is redirecting the request for this 
address in a way that will never complete.

What am I doing wrong?

To me it looks as though you would have to own the domain name 
"application" with an appropriate .com, .net or the like before any 
browser would recognize your Location HTTP header. I'd like to see that 
header as it appears after your Redirect is processed. If this is all in a 
local domain does your local DNS - bind?? - do the right thing?

But then perhaps I'm about to learn something I don't now about apache.



DNS resolves the "server" and "application" hostnames correctly. If I go 
to:
http://application/application
I get the correct page. What I want is for
http://application
to redirect me to
http://application/application


I have also tried the following VirtualHost config with the same results:

NameVirtualHost XXX.XXX.XXX.XXX

<VirtualHost XXX.XXX.XXX.XXX>
    ServerName application.example.com
    ServerAlias *
    Redirect permanent / http://servert/application
</VirtualHost>

Re: [users@httpd] Redirect question

Posted by Doug McNutt <do...@macnauchtan.com>.
At 16:46 -0400 5/5/10, John.C.Kennedy@LDHEnergy.com wrote:
I have an application running on a server at:
<http://server/application>http://server/application

My user wants me to set up so that
<http://application/>http://application
will redirect to:
<http://server/application>http://server/application

I have DNS set up and now if I go to:
<http://application/application>http://application/application
the correct page is displayed. I just can not seem to get
<http://application/>http://application
to go to the right place.

I have tried to use Redirect:
Redirect permanent / <http://server/application>http://server/application
but I then get:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

What am I doing wrong?

To me it looks as though you would have to own the domain name "application" with an appropriate .com, .net or the like before any browser would recognize your Location HTTP header. I'd like to see that header as it appears after your Redirect is processed. If this is all in a local domain does your local DNS - bind?? - do the right thing?

But then perhaps I'm about to learn something I don't now about apache.
-- 

--> A fair tax is one that you pay but I don't <--

---------------------------------------------------------------------
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] mod_expires > Why are both the Expires and Cache-Control HTTP headers set?

Posted by Nick Kew <ni...@webthing.com>.
On 10 May 2010, at 23:37, Geoff Millikan wrote:

>> The HTTP spec linked below says, "Servers specify explicit 
>> expiration times using *either* the Expires header, or
>> the max-age directive of the Cache-Control header."
>> 
>> So why then does mod_expires set *both* the Expires HTTP 
>> header *and* the max-age directive of the 
>> Cache-Control HTTP header?  It's overkill to set
>> both, right? 

It's a cousin of (half of) Postel's law: be careful in what you send.
If the server sets both headers, it maximises the chance of an
unknown client understanding at least one of them.

-- 
Nick Kew

---------------------------------------------------------------------
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] mod_expires > Why are both the Expires and Cache-Control HTTP headers set?

Posted by Eric Covener <co...@gmail.com>.
On Mon, May 10, 2010 at 6:37 PM, Geoff Millikan <gm...@t1shopper.com> wrote:
>> The HTTP spec linked below says, "Servers specify explicit
>> expiration times using *either* the Expires header, or
>> the max-age directive of the Cache-Control header."

It later talks about times when you might want to set them to
different values, so I wouldn't interpret "either" as not allowing
both.

>> So why then does mod_expires set *both* the Expires HTTP
>> header *and* the max-age directive of the
>> Cache-Control HTTP header?  It's overkill to set
>> both, right?

It's been like that in mod_expires for more than 10 years, perhaps
there were clients that knew Cache-Control but not Expires (and 1.0
clients that have the other side)

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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] mod_expires > Why are both the Expires and Cache-Control HTTP headers set?

Posted by Geoff Millikan <gm...@t1shopper.com>.
<crickets chirping>

Is this the wrong forum for this question?

</crickets chirping>

> The HTTP spec linked below says, "Servers specify explicit 
> expiration times using *either* the Expires header, or
> the max-age directive of the Cache-Control header."
> 
> So why then does mod_expires set *both* the Expires HTTP 
> header *and* the max-age directive of the 
> Cache-Control HTTP header?  It's overkill to set
> both, right? 
> 
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.1
> 
> http://httpd.apache.org/docs/2.2/mod/mod_expires.html
> 
> Thanks,
> 
> http://www.t1shopper.com/
> 
> PS. It would be great if mod_expires had a Directive something like
> "ExpiresHeader" where the syntax could be something like
> Expires|Cache-Control|All
> 

[users@httpd] mod_expires > Why are both the Expires and Cache-Control HTTP headers set?

Posted by Geoff Millikan <gm...@t1shopper.com>.
The HTTP spec linked below says, "Servers specify explicit expiration times
using *either* the Expires header, or the max-age directive of the
Cache-Control header."

So why then does mod_expires set *both* the Expires HTTP header *and* the
max-age directive of the Cache-Control HTTP header?  It's overkill to set
both, right? 

http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.1

http://httpd.apache.org/docs/2.2/mod/mod_expires.html

Thanks,

http://www.t1shopper.com/

PS. It would be great if mod_expires had a Directive something like
"ExpiresHeader" where the syntax could be something like
Expires|Cache-Control|All

Re: [users@httpd] Redirect question

Posted by Jo...@LDHEnergy.com.
Igor Cicimov <ic...@gmail.com> wrote on 05/07/2010 01:39:59 AM:

> Igor Cicimov <ic...@gmail.com> 
> 05/07/2010 01:39 AM
> 
> Please respond to
> users@httpd.apache.org
> 
> To
> 
> users@httpd.apache.org
> 
> cc
> 
> Subject
> 
> Re: [users@httpd] Redirect question
> 
> Another possible solution I can think of:
> 
> NameVirtualHost 1.2.3.4:80
> <VirtualHost _default_:80>
> # Virtual host that will collect all the request not hitting
> # the main virtual host (including application.example.com one)
> # and redirect them to server.example.com/application
> DocumentRoot /usr/local/apache2/htdocs
> Redirect permanent / http://server.example.com/application
> </VirtualHost>
> <VirtualHost 1.2.3.4:80>
> # Your man virtual host
> DocumentRoot /usr/local/apache2/htdocs
> ServerName server.example.com
> .
> .
> .
> </VirtualHost>
> 
> Igor

What ended up working for us was RedirectMatch. I had tried this at one 
time but messed up the regular expression.
The syntax I needed was:

RedirectMatch ^/$ http://application/application

Since "application" is in DNS pointing to "server" this works.

Thanks to EVERYONE who gave suggestions...
John

Re: [users@httpd] Redirect question

Posted by Igor Cicimov <ic...@gmail.com>.
Another possible solution I can think of:

NameVirtualHost 1.2.3.4:80 <http://1.2.3.4/>
<VirtualHost _default_:80>
# Virtual host that will collect all the request not hitting
# the main virtual host (including application.example.com one)
# and redirect them to server.example.com/application
DocumentRoot /usr/local/apache2/htdocs
Redirect permanent / http://server.example.com/application
</VirtualHost>
<VirtualHost 1.2.3.4:80 <http://1.2.3.4/>>
# Your man virtual host
DocumentRoot /usr/local/apache2/htdocs
ServerName server.example.com
.
.
.
 </VirtualHost>

Igor

On Fri, May 7, 2010 at 1:21 PM, Igor Cicimov <ic...@gmail.com> wrote:

> What happens if you try
>
> NameVirtualHost 1.2.3.4:80
> <VirtualHost 1.2.3.4:80>
>
> ServerName server.example.com
> ServerAlias application.example.com
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^application.example.com$
>
> Redirect permanent / http://server.example.com/application
> </VirtualHost>
>
> if Redirect command doesn't work you can try
>
> RewriteRule / http://server.example.com/application [R=301,L]
>
> instead.
>
> Igor
>
>
> On Thu, May 6, 2010 at 11:49 PM, <Jo...@ldhenergy.com> wrote:
>
>>
>>
>>
>>
>>
>> >
>> > I get the same looping result. (I shortened application to app because
>> > I am too lazy to type all that!):
>> > The requested URL
>> > /appappappappappappappappappappappappappappappappappappappappapp was
>> > not found on this server.
>>
>> Did you remove any other Redirect rules in your VirtualHost container? I
>> don't see how the above config could possibly cause a redirect like you
>> are seeing, because once the redirect is made, the browser is no longer
>> requesting http://application/ (it's requesting
>> http://server/application). This rewrite only applies when the host name
>> is "application".
>>
>> --
>> Justin Pasher
>>
>>
>> No other redirects in in place.
>> We are wondering (and, yes, I probably should have mentioned this) if the
>> fact that we are using mod_jk is having an effect.
>> Basically, this server uses mod_jk to point to 1 of 2 Tomcat5 servers for
>> load balancing. I don't think it should cause a problem since the redirect
>> happens before mod_jk does it's magic but maybe I am wrong in thinking
>> that???
>> John
>>
>> 2 VirtualHost containers we have tried:
>>
>> NameVirtualHost 1.2.3.4
>> <VirtualHost 1.2.3.4>
>>     ServerName server.example.com
>>     ServerAlias application.example.com
>>     Redirect permanent / http://server.example.com/application
>> </VirtualHost>
>>
>> And
>> NameVirtualHost 1.2.3.4
>> <VirtualHost 1.2.3.4>
>>     ServerName server.example.com
>>     ServerAlias application.example.com
>>     RewriteEngine   On
>>     RewriteCond %{HTTP_HOST} ^zemaqa$ [NC]
>>     RewriteRule . http://wltzemaq01.ldhenergy.net/zema [R=permanent]
>> </VirtualHost>
>>
>> ---------------------------------------------------------------------
>> 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 question

Posted by Igor Cicimov <ic...@gmail.com>.
What happens if you try

NameVirtualHost 1.2.3.4:80
<VirtualHost 1.2.3.4:80>
ServerName server.example.com
ServerAlias application.example.com

RewriteEngine On
RewriteCond %{HTTP_HOST} ^application.example.com$
Redirect permanent / http://server.example.com/application
</VirtualHost>

if Redirect command doesn't work you can try

RewriteRule / http://server.example.com/application [R=301,L]

instead.

Igor

On Thu, May 6, 2010 at 11:49 PM, <Jo...@ldhenergy.com> wrote:

>
>
>
>
>
> >
> > I get the same looping result. (I shortened application to app because
> > I am too lazy to type all that!):
> > The requested URL
> > /appappappappappappappappappappappappappappappappappappappappapp was
> > not found on this server.
>
> Did you remove any other Redirect rules in your VirtualHost container? I
> don't see how the above config could possibly cause a redirect like you
> are seeing, because once the redirect is made, the browser is no longer
> requesting http://application/ (it's requesting
> http://server/application). This rewrite only applies when the host name
> is "application".
>
> --
> Justin Pasher
>
>
> No other redirects in in place.
> We are wondering (and, yes, I probably should have mentioned this) if the
> fact that we are using mod_jk is having an effect.
> Basically, this server uses mod_jk to point to 1 of 2 Tomcat5 servers for
> load balancing. I don't think it should cause a problem since the redirect
> happens before mod_jk does it's magic but maybe I am wrong in thinking
> that???
> John
>
> 2 VirtualHost containers we have tried:
>
> NameVirtualHost 1.2.3.4
> <VirtualHost 1.2.3.4>
>     ServerName server.example.com
>     ServerAlias application.example.com
>     Redirect permanent / http://server.example.com/application
> </VirtualHost>
>
> And
> NameVirtualHost 1.2.3.4
> <VirtualHost 1.2.3.4>
>     ServerName server.example.com
>     ServerAlias application.example.com
>     RewriteEngine   On
>     RewriteCond %{HTTP_HOST} ^zemaqa$ [NC]
>     RewriteRule . http://wltzemaq01.ldhenergy.net/zema [R=permanent]
> </VirtualHost>
>
> ---------------------------------------------------------------------
> 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 question

Posted by Jo...@LDHEnergy.com.
>
> I get the same looping result. (I shortened application to app because 
> I am too lazy to type all that!):
> The requested URL 
> /appappappappappappappappappappappappappappappappappappappappapp was 
> not found on this server.

Did you remove any other Redirect rules in your VirtualHost container? I 
don't see how the above config could possibly cause a redirect like you 
are seeing, because once the redirect is made, the browser is no longer 
requesting http://application/ (it's requesting 
http://server/application). This rewrite only applies when the host name 
is "application".

-- 
Justin Pasher


No other redirects in in place. 
We are wondering (and, yes, I probably should have mentioned this) if the 
fact that we are using mod_jk is having an effect.
Basically, this server uses mod_jk to point to 1 of 2 Tomcat5 servers for 
load balancing. I don't think it should cause a problem since the redirect 
happens before mod_jk does it's magic but maybe I am wrong in thinking 
that???
John

2 VirtualHost containers we have tried:

NameVirtualHost 1.2.3.4
<VirtualHost 1.2.3.4>
    ServerName server.example.com
    ServerAlias application.example.com
    Redirect permanent / http://server.example.com/application
</VirtualHost>

And
NameVirtualHost 1.2.3.4
<VirtualHost 1.2.3.4>
    ServerName server.example.com
    ServerAlias application.example.com
    RewriteEngine   On
    RewriteCond %{HTTP_HOST} ^zemaqa$ [NC]
    RewriteRule . http://wltzemaq01.ldhenergy.net/zema [R=permanent]
</VirtualHost>

---------------------------------------------------------------------
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 question

Posted by Justin Pasher <ju...@newmediagateway.com>.
----- Original Message -----
> From: John.C.Kennedy@LDHEnergy.com
> Date: Wed, 5 May 2010 17:52:39 -0400
> Subject: Re: [users@httpd] Redirect question
> To: users@httpd.apache.org
> 
>
> <VirtualHost 1.2.3.4:80>
>    ServerName  server
>    ServerAlias application
>
>    RewriteEngine   On
>    RewriteCond %{HTTP_HOST} ^application$ [NC]
>    RewriteRule . http://server/application [R=permanent]
>    ....  
> </VirtualHost>
>
>
> -- 
> Justin Pasher
>
>
> I get the same looping result. (I shortened application to app because 
> I am too lazy to type all that!):
> The requested URL 
> /appappappappappappappappappappappappappappappappappappappappapp was 
> not found on this server.

Did you remove any other Redirect rules in your VirtualHost container? I 
don't see how the above config could possibly cause a redirect like you 
are seeing, because once the redirect is made, the browser is no longer 
requesting http://application/ (it's requesting 
http://server/application). This rewrite only applies when the host name 
is "application".

-- 
Justin Pasher

---------------------------------------------------------------------
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 question

Posted by Jo...@LDHEnergy.com.
----- Original Message -----
> From: John.C.Kennedy@LDHEnergy.com
> Date: Wed, 5 May 2010 16:46:34 -0400
> Subject: [users@httpd] Redirect question
> To: users@httpd.apache.org
> 
>
> My user wants me to set up so that
> http://application <http://application/>
> will redirect to:
> http://server/application

How are your VirtualHost containers setup (assuming you are using them)? 
A simple rewrite rule with the domain check should work (assuming that 
"application" and "server" are domain names).

<VirtualHost 1.2.3.4:80>
    ServerName  server
    ServerAlias application

    RewriteEngine   On
    RewriteCond %{HTTP_HOST} ^application$ [NC]
    RewriteRule . http://server/application [R=permanent]
    .... 
</VirtualHost>


-- 
Justin Pasher


I get the same looping result. (I shortened application to app because I 
am too lazy to type all that!):
The requested URL 
/appappappappappappappappappappappappappappappappappappappappapp was not 
found on this server. 

---------------------------------------------------------------------
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 question

Posted by Justin Pasher <ju...@newmediagateway.com>.
----- Original Message -----
> From: John.C.Kennedy@LDHEnergy.com
> Date: Wed, 5 May 2010 16:46:34 -0400
> Subject: [users@httpd] Redirect question
> To: users@httpd.apache.org
> 
>
> My user wants me to set up so that
> http://application <http://application/>
> will redirect to:
> http://server/application

How are your VirtualHost containers setup (assuming you are using them)? 
A simple rewrite rule with the domain check should work (assuming that 
"application" and "server" are domain names).

<VirtualHost 1.2.3.4:80>
    ServerName  server
    ServerAlias application

    RewriteEngine   On
    RewriteCond %{HTTP_HOST} ^application$ [NC]
    RewriteRule . http://server/application [R=permanent]
    ....  
</VirtualHost>


-- 
Justin Pasher

---------------------------------------------------------------------
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