Have you tried using the P flag in the RewriteRule?

Cheers,
Igor


On Tue, Nov 2, 2010 at 4:26 PM, Tushar Chavan <tushar.cha...@hotmail.com>wrote:

>  Hi Eric,
>
> We have set SERVER_NAME & HTTP_HOST env. variables but still it is not
> working.
>
> Let me explain our scenario.
>
> https://srmdevarp01.domain/irj  ( this url will give us the portal page )
>
> On the the portal page there is href  ( href="
> https://srmdevarp01.domain/sap(bD1lbiZjPTAxNiZkPW1pbg==)/bc/bsp/sap/z_ros_self_reg1/main.htm<https://srmdevarp01.domain/sap%28bD1lbiZjPTAxNiZkPW1pbg==%29/bc/bsp/sap/z_ros_self_reg1/main.htm>"
> ) for self registration.
>
> Now when anyone will click on the href they will be redirected to the
> srmsbx host by rewrite rule ( RewriteRule  ^/(sap\(.*)
> http://srmsbx.domain:8000/$1  )
>
> i.e whoever clicks on the self registration button on the portal page ,
> will be re-directed to http://srmsbx.domain:8000/*
> sap(bD1lbiZjPTAxNiZkPW1pbg==)/bc/bsp/sap/z_ros_self_reg1/main.htm*<http://srmsbx.domain:8000/sap%28bD1lbiZjPTAxNiZkPW1pbg==%29/bc/bsp/sap/z_ros_self_reg1/main.htm>
> .
> **
> Now here we want to *retain apache host name i.e srmdevarp01* just like we
> do with   ProxyPreserveHost.
>
> Please let me know if there is way to do it.
>
> Best Regards,
> Tushar
>
>
> > Date: Mon, 1 Nov 2010 08:06:39 -0400
> > From: cove...@gmail.com
> > To: users@httpd.apache.org
> > Subject: Re: [us...@httpd] RewriteRule : How to retain Apache Host in
> the url
> >
> > On Mon, Nov 1, 2010 at 3:54 AM, Tushar Chavan <tushar.cha...@hotmail.com>
> wrote:
> > > Hi Experts,
> > >
> > > We have definded rewrite rule as below
> > > RewriteEngine on
> > > RewriteRule ^/(sap\(.*)         http://srmhost.kjo.com.sa:8000/$1
> > > So now whenever url
> > >
> https://apache_host.domain/sap(bD1lbiZjPTAxNiZkPW1pbg==)/bc/bsp/sap/z_ros_self_reg1/main.htm<https://apache_host.domain/sap%28bD1lbiZjPTAxNiZkPW1pbg==%29/bc/bsp/sap/z_ros_self_reg1/main.htm>
> > > is called, it
> > > will re-direct to
> > >
> http://srmhost.kjo.com.sa:8000/sap(bD1lbiZjPTAxNiZkPW1pbg==)/bc/bsp/sap/z_ros_self_reg1/main.htm<http://srmhost.kjo.com.sa:8000/sap%28bD1lbiZjPTAxNiZkPW1pbg==%29/bc/bsp/sap/z_ros_self_reg1/main.htm>
> > > which is ok.
> >
> > %{SERVER_NAME} or %{HTTP_HOST}
> > >
> > > But can we retain apache_host name in the url so that srmhost is not
> visible
> > > to the outer world.
> > >
> > > Best Regards,
> > > Tushar.
> > >
> >
> >
> >
> > --
> > Eric Covener
> > cove...@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-unsubscr...@httpd.apache.org
> > " from the digest: users-digest-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
> >
>

Reply via email to