Until we can get all our wikis moved to OpenID - this is what we've been doing using Apache's mod_rewrite.
In the <Directory /> config for the MediaWiki for the port 80 vhost conf:
RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteCond %{QUERY_STRING} .*Special:Userlogin.* [NC] RewriteRule ^.*$ https://%%7BSERVER_NAME%7D% {REQUEST_URI} [L,R]
RewriteCond %{SERVER_PORT} !^443$ RewriteCond %{REQUEST_URI} .*Special:Userlogin.* [NC] RewriteRule ^.*$ https://%%7BSERVER_NAME%7D% {REQUEST_URI} [L,R]
For the port 443 vhost conf:
RewriteEngine on RewriteCond %{QUERY_STRING} !.*Special:Userlogin.* RewriteCond %{QUERY_STRING} !.*MediaWiki:.* RewriteCond %{QUERY_STRING} !.*title=-.* RewriteCond %{REQUEST_URI} !.*Special:Userlogin.* RewriteCond %{REQUEST_URI} !.*skins/.* RewriteRule ^.*$ http://%%7BSERVER_NAME%7D%%7BREQUEST_URI%7D [L,R]
jason
On Aug 14, 2007, at 1:26 PM, Thomas Dalton wrote:
Is there any way to do this in the server configuration, rather than in MediaWiki? Just tell the server to always use https for that particular page. (This may well be impossible, especially since the request is initiated by the user, not the server, but if it's possible, it would be easier than hacking MediaWiki.)
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________