Thanks Joshua. I figured what I was doing is inefficient and there might be a better "algorithm" to lazy trigger the Rewrite versus checking every single request. But since it's just one particular page where this will be in effect, I'm not as concerned. Cheers, /sf On 2/22/08, Steve Finkelstein <sf@xxxxxxxxxxxxx> wrote: > This is a very rudimentary concept and is typically done in a cookie > cutter fashion. However, I can't seem to recall the proper > syntax/conditions to get it to function as required. > > Essentially I need to enable SSL in one URL and one URL only, one that > ends in login.php. So I wrote a rule like this: > > RewriteEngine On > RewriteCond %{HTTPS} !=on > RewriteRule ^/login.php$ https://foo/login.php [R,L] > > Works great. > > Now in the SSL virtualHost, I want it to redirect to a non-SSL version > of the site if the URL doesn't end in login.php. > > RewriteEngine On > RewriteRule !^/login.php$ http://%{SERVER_NAME} > > > This was working great except for one issue. It completely breaks all > images, CSS, JavaScript, and other goodies. Is there a possible way to > exclude those also or perhaps a more appropriate way to rewrite my > second batch of rules for the SSL Vhost? > > Cheers, > > > /sf > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx