I went back to betabug and reran the rule generator. I was able to use the rules for http connections... but not for https connection.

I thought the two rules might be conflicting some how so I commented out the rules for http connections and the https connections still don't work, ie I still get the 404 error.

Here is what I have now.

# see http://betabug.ch/zope/witch
# RewriteRule ^/z2$ \
# http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]

# RewriteRule ^/z2/(.*) \
# http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]

RewriteRule ^/z2$ \\
https/%{SERVER_NAME}:443/VirtualHostRoot/_vh_z2/ [L,P]

RewriteRule ^/z2/(.*) \\
https/%{SERVER_NAME}:443/VirtualHostRoot/_vh_z2/$1 [L,P]

I can uncomment the http rules and they work. But whats the point of using apache if I can get it to do https? (aside from legacy files and other apps that depend on it...)

There must be a better way..

On 5/25/06, Sascha Welter <[EMAIL PROTECTED]> wrote:
(Wed, May 24, 2006 at 12:00:09PM -0400) [EMAIL PROTECTED] wrote/schrieb/egrapse:
> From: "David Bear" <[EMAIL PROTECTED] >

> # see http://betabug.ch/zope/witch
> RewriteRule ^/z2$\
> https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]
> RewriteRule ^/z2/(.*)\
> https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]
Just telling the witch to use "https" isn't enough, you have to tell it
the port too (usually 443).

This isn't the most obvious thing from th form, but it should be a cluee
that the port doesn't change when you select https.

> I also found the following rule from scanning through zope-list postings, to
> force any logon authentication requests to go over https. However, since the
> above rules fail, the following does nothing.
> RewriteRule ^/login_form(.*) https://%{SERVER_NAME}/login_form$1 [NE,L]

This is a redirect and once your https-rewriterule works, it should too.

> From: Chris Withers < [EMAIL PROTECTED]>
> In both cases, I see no need for two rules, just the one should suffice:
> RewriteRule ^/z2(.*)\
> http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2$1 [L,P]

Yes, that will work too, unless of course you happen to have a URL that
goes something like http://www.host.tld/z2thisisnotzope/index.html and apache
will happily rewrite it for you, resulting in a 404.

The two rules of the witch could likely be rewritten to one, but two
rules cover the two possibilities easy in a form that humans can grasp:
Either the URL ends there, or else it has a slash and then as much as
there is.



Zope maillist  -   Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-dev )

David Bear
What's the difference between private knowledge and public knowledge?
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to