QUOTE:
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} ^/namespace/.*
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
NOTES:
The HTTPS variable isn't available on all servers. I would use port detection instead.
You don't need a trailing .* on the pattern when it isn't going to be used in a backreference.
The pattern in the rule is evaluated before any RewriteCond. Make the pattern more specific so it only matches the small number of wanted URLs.
Your rule does not canonicalise the host name. That leads to a redirection chain when both the protocol and host name in the request are non-canonical.
I would suggest:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^namespace/(.*) https://www.example.com/namespace/$1 [R=301,L]
Links pointing back to the main namespace from the secure area will potentially be followed as HTTPS URLs, so creating Duplicate Content indexing issues for the rest of the site. Make sure all links pointing to outside of the secure area use HTTP as the protocol prefix, and add a rule to redirect to http:// for all HTTPS requests outside of the secure area.
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^/namespace/
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Links to images within the secure area may be problematical. If they are prefixed with http:// you'll get a security warning in the browser about having some 'non-secure content' within the secure area. I would guess that the designers of the Wiki have already addressed that, because everything else I have seen so far has been very well designed. :)