You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ar...@mail.orbitel.bg on 2007/02/02 22:17:24 UTC

[users@httpd] simple rewrite rule

Hi,

I would like to have a path like /go/ after which the address to be proxied.
This is the config:

<Location /go/ >

   SSLCipherSuite MEDIUM
   SSLRequireSSL

    AuthType Digest
    AuthName "Restricted Area"
    AuthDigestDomain /go/
    AuthDigestProvider file
    AuthUserFile /var/www/.digestpwd
    Require valid-user

   RewriteEngine on
   RewriteRule ^(.*)  http://$1  [P,L]

</Location>


but the rewrite rule does not work.
I get an error /go/yahoo.com not found on this server.

I would like when i type /myserver/go/yahoo.com to be connected to  
yahoo.com through myserver.

thanks


---------------------------------------------------------------------
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] simple rewrite rule

Posted by Serge Dubrouski <se...@gmail.com>.
On 2/2/07, arry@mail.orbitel.bg <ar...@mail.orbitel.bg> wrote:
> Hi,
>
> I would like to have a path like /go/ after which the address to be proxied.
> This is the config:
>
> <Location /go/ >
>
>    SSLCipherSuite MEDIUM
>    SSLRequireSSL
>
>     AuthType Digest
>     AuthName "Restricted Area"
>     AuthDigestDomain /go/
>     AuthDigestProvider file
>     AuthUserFile /var/www/.digestpwd
>     Require valid-user
>
>    RewriteEngine on
>    RewriteRule ^(.*)  http://$1  [P,L]

RewriteRule ^/go/(.*) http://SERVER_NAME_SHOULD_BE_HERE/$1 [P,L]

What is the reason top put SSL options in Location tag?
>
> </Location>
>
>
> but the rewrite rule does not work.
> I get an error /go/yahoo.com not found on this server.
>
> I would like when i type /myserver/go/yahoo.com to be connected to
> yahoo.com through myserver.
>
> thanks
>
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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] simple rewrite rule

Posted by Serge Dubrouski <se...@gmail.com>.
There is a RewriteCond with which you can build any kind of
rewriting/redirection rules.

On 2/2/07, arry@mail.orbitel.bg <ar...@mail.orbitel.bg> wrote:
> Hi,
>
> Is there a rewrite option for stopping the redirects, like ReverseProxyPass?
> I looked in the manual but could not find.
>
> thanks
>
> H.Todorov
>
> > Quoting Bob <bo...@googlemail.com>:
> >
> >> arry@mail.orbitel.bg wrote:
> >>> <Location /go/ >
> >> [...]
> >>> RewriteEngine on
> >>> RewriteRule ^(.*)  http://$1  [P,L]
> >>
> >> RewriteRules inside location sections are syntactically permitted, but
> >> unsupported (see manual).
> >>
> >> --
> >> Bob
> >
> > OHhh...,
> >
> > thanks for pointing that out.
> > i will put it in server config then
> >
> >
> >
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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] simple rewrite rule

Posted by ar...@mail.orbitel.bg.
Hi,

Is there a rewrite option for stopping the redirects, like ReverseProxyPass?
I looked in the manual but could not find.

thanks

H.Todorov

> Quoting Bob <bo...@googlemail.com>:
>
>> arry@mail.orbitel.bg wrote:
>>> <Location /go/ >
>> [...]
>>> RewriteEngine on
>>> RewriteRule ^(.*)  http://$1  [P,L]
>>
>> RewriteRules inside location sections are syntactically permitted, but
>> unsupported (see manual).
>>
>> -- 
>> Bob
>
> OHhh...,
>
> thanks for pointing that out.
> i will put it in server config then
>
>
>
>>
>> ---------------------------------------------------------------------
>> 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




---------------------------------------------------------------------
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] simple rewrite rule

Posted by ar...@mail.orbitel.bg.
Quoting Bob <bo...@googlemail.com>:

> arry@mail.orbitel.bg wrote:
>> <Location /go/ >
> [...]
>>  RewriteEngine on
>>  RewriteRule ^(.*)  http://$1  [P,L]
>
> RewriteRules inside location sections are syntactically permitted, but
> unsupported (see manual).
>
> -- 
> Bob

OHhh...,

thanks for pointing that out.
i will put it in server config then



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




---------------------------------------------------------------------
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] simple rewrite rule

Posted by Bob <bo...@googlemail.com>.
arry@mail.orbitel.bg wrote:
> <Location /go/ >
[...]
>   RewriteEngine on
>   RewriteRule ^(.*)  http://$1  [P,L]

RewriteRules inside location sections are syntactically permitted, but 
unsupported (see manual).

-- 
Bob

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