ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

htaccess ssl issues

March 04, 2010 8:01am

Subscribe [1]
  • #1 / Mar 04, 2010 8:01am

    gamma911

    51 posts

    HI Guys

    Can anyone help with this ssl issue

    I would like certain parts of the site to be forced into https and others http
    I also have index.php removed
    This is working correctly so far with this code in htaccess

    # Setup
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    
    RewriteCond %{REQUEST_URI} (checkout)
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    
    # not anywhere else
    #RewriteCond %{SERVER_PORT} !^80$
    #RewriteCond %{REQUEST_URI} !^/?()(.*)
    #RewriteCond %{REQUEST_URI} !^/?index\.php$
    #RewriteRule .? <a href="http://www.servername.com%{request_uri}">http://www.servername.com%{request_uri}</a> [R,L]
    
    
    # rewrite out the index.php page
    RewriteCond $1 !^(images|img|css|js|log|scripts|templates|themes|favicon\.ico|robots\.txt|index\.php) [NC]
    RewriteRule ^(.*)$ index.php/$1 [L]

    The Not anywhere else bit isn’t working ( and commented out just now ), basically when a user is on the checkout page and then navigates to a relative url like (/) then it goes to https. I need it to go to http

     

    So

    / + anywhere other than checkout -> http
    /checkout/  -> https
    no index.php

    Any ideas?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases