You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Roman Gelfand <rg...@gmail.com> on 2012/01/18 19:37:20 UTC

[users@httpd] RewriteRule

I am trying to proxy off requests from wan url
https://external.mydomain.com/sipxconfig to an internal site
https://internal.mydomain.com:8443/sipxconfig.

This what I attempted to do

RewriteRule ^https://external.mydomain.com:8443$
https://external.mydomain.com/ [R]
RewriteRule ^https://internal.mydomain.com:8443$
https://external.mydomain.com/ [R]
RewriteRule /sipxconfig$ https://external.mydomain.com/sipxconfig/ [R]
 <Location /sipxconfig/>
 ProxyPass https://internal.mydomain.com:8443/sipxconfig/
 ProxyPassReverse https://internal.mydomain.com:8443/sipxconfig/
 </location>

There appears to be one more outstanding problem.  That is, the tag
below doesn't get rewritten.


<base href="https://internal.mydomain.com:8443/sipxconfig/" /><!--[if
IE]></base><![endif]-->

Any help is appreciated.

Thanks in advance

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

Posted by Igor Cicimov <ic...@gmail.com>.
You rewrite based on the URI not the URL. Read the mod_rewrite docs and
examples.
 On Jan 19, 2012 5:37 AM, "Roman Gelfand" <rg...@gmail.com> wrote:

> I am trying to proxy off requests from wan url
> https://external.mydomain.com/sipxconfig to an internal site
> https://internal.mydomain.com:8443/sipxconfig.
>
> This what I attempted to do
>
> RewriteRule ^https://external.mydomain.com:8443$
> https://external.mydomain.com/ [R]
> RewriteRule ^https://internal.mydomain.com:8443$
> https://external.mydomain.com/ [R]
> RewriteRule /sipxconfig$ https://external.mydomain.com/sipxconfig/ [R]
>  <Location /sipxconfig/>
>  ProxyPass https://internal.mydomain.com:8443/sipxconfig/
>  ProxyPassReverse https://internal.mydomain.com:8443/sipxconfig/
>  </location>
>
> There appears to be one more outstanding problem.  That is, the tag
> below doesn't get rewritten.
>
>
> <base href="https://internal.mydomain.com:8443/sipxconfig/" /><!--[if
> IE]></base><![endif]-->
>
> Any help is appreciated.
>
> Thanks in advance
>
> ---------------------------------------------------------------------
> 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
>
>