Public feed #891282

Anonymous

public text v1 · immutable
Raw Edit
·published 2008-02-04 14:49 UTC
rendered paste body
The following will ask for an SSLClientCert, then show me /SSL/test.html, when you visit "/forum/index.php?page=IRC"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

RewriteEngine on

RewriteCond %{QUERY_STRING} page=IRC
RewriteRule ^/forum/(.*) /SSL/test.html

<Directory /www/SSL>

SSLVerifyClient require
SSLVerifyDepth 1

RewriteCond %{SSL:SSL_CLIENT_S_DN} ^$
RewriteRule ^/SSL/test.html /forum/index.php?page=IRC2 [S=1]
RewriteRule ^/SSL/test.html /forum/index.php?page=IRC3

</Directory>

</VirtualHost>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following will display "/forum/index.php?page=IRC2" and can *does not* ask for a client cert (and thus, will never be able to display /forum/index.php?page=IRC3, because SSL:SSL_CLIENT_S_DN requires SSLVerifyClient to have been ran previously) if you go to "/forum/index.php?page=IRC"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

RewriteEngine on

RewriteCond %{QUERY_STRING} page=IRC
RewriteRule ^/forum/(.*) /SSL/test.html

<Directory /www/SSL>

SSLVerifyClient require
SSLVerifyDepth 1

</Directory>

RewriteCond %{SSL:SSL_CLIENT_S_DN} ^$
RewriteRule ^/SSL/test.html /forum/index.php?page=IRC2 [S=1]
RewriteRule ^/SSL/test.html /forum/index.php?page=IRC3

</VirtualHost>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Notice all that's changed is i've taken the last three RewriteRules out of the <Directory>.