Jon Garvin wrote:
> According to the pound man page...
>
> Examples: if you specified
>
> Redirect "http://abc.example"
>
> and the client requested http://xyz/a/b/c then it will be redirected
> to http://abc.example/a/b/c, but if you specified
>
> Redirect "http://abc.example/index.html"
>
> it will be sent to http://abc.example/index.html.
>
>
> However, the following rule which is inside a ListenHTTPS block...
>
> Service
> HeadRequire "Host:\s*(www\.)?myserver\.org.*"
> URL "^/[^(secure)].*"
> Redirect "http://www.myserver.org"
> End
>
>
> isn't quite doing what I want. IF I understand the man page correctly,
> someone browsing to....
>
> https://www.myserver.org/some_unsecured_page/generic
>
> should (as I understand it) get redirected to (note the protocol change)
>
> http://www.myserver.org/some_unsecured_page/generic
>
> however, instead they're being sent to.
>
> http://www.myserver.org
>
>
>
> Any idea why? Is the request path being dropped because I'm switching
> protocols? Or if there something dumb that I'm (not) doing that
> should(n't) be.
>
> Thanks.
>
>
Well, I guess it would help if I was on the latest version of Pound, AND
setup my config correctly. I was stuck on trying to figure out how to
create a URL pattern that would match anything BUT a particular
pattern. Finally realized to move the URL pattern into the other
Service block that points to the back end, and then put the Service
block that does the redirect after that so that anything that falls
through redirects. So, now this works exactly like I want, redirecting
all requests not in the 'secure' directory back to HTTP, while
maintaining the rest of their path.
Service
HeadRequire "Host:\s*www\.myserver\.org.*"
URL "^/secure.*"
BackEnd
Address 127.0.0.1
Port 3001
End
End
Service
HeadRequire "Host:\s*(www\.)?myserver\.org.*"
Redirect "http://www.myserver.org"
End
--
http://www.5valleys.com/
http://www.workingwithrails.com/person/8078
--
To unsubscribe send an email with subject unsubscribe to [EMAIL PROTECTED]
Please contact [EMAIL PROTECTED] for questions.