Let me make sure that certain Web addresses on my small site will always be utilized via HTTPS while other Web addresses are utilized via HTTP.

I'm able to get either situation employed in my .htaccess file, if however I enable both, i quickly get infinite redirects.

My .htaccess file is:

<IfModule mod_expires.c>
# turn off the module for this directory
ExpiresActive off

Options +FollowSymLinks
AddHandler application/x-httpd-php .csv

RewriteEngine On

RewriteRule ^/?registration(.*)$ /register$1 [R=301,L]

# Force SSL for certain URL's
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (login|register|account)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# Force non-SSL for certain URL's
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !(login|register|account)
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# Force files ending in X to use same protocol as initial request
RewriteRule \.(gif|jpg|jpeg|jpe|png|ico|css|js)$ - [S=1]

# Use index.php as the controller
RewriteCond %{REQUEST_URI} !\.(exe|css|js|jpe?g|gif|png|pdf|doc|txt|rtf|xls|swf|htc|ico)$ [NC]
RewriteCond %{REQUEST_URI} !^(/js.*)$
RewriteRule ^(.*)$ index.php [NC,L]

Does anybody have suggestions how I'm able to pressure the login, register and account pages to become https while forcing almost every other page not to be?

It appears you're matching HTTPS=on for SSL and HTTPS=off for unencrypted connections.

You need to make sure that HTTPS atmosphere variable has been set while you expect. Otherwise you will see an infinite redirect - when you are going through.

For instance: https://issues.apache.org/bugzilla/show_bug.cgi?id=50581