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.

CP SSL question

April 21, 2012 2:49pm

Subscribe [2]
  • #1 / Apr 21, 2012 2:49pm

    soundseller

    52 posts

    Hi,
    I am trying to use a secure connection for the cp.
    I am using:

    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    in my htaccess to redirect all pages to https.
    When I enter the cp url like this

    <a href="http://mydomain.com/system">http://mydomain.com/system</a>

    I am getting redirected to

    <a href="http://mydomain.com:443/system">http://mydomain.com:443/system</a>
    Your browser sent a request that this server could not understand.
    Reason: You're speaking plain HTTP to an SSL-enabled server port.
    Instead use the HTTPS scheme to access this URL, please.

    When entering the cp url like this:

    <a href="http://mydomain.com/system/">http://mydomain.com/system/</a>

    or this

    <a href="http://mydomain.com/system/index.php">http://mydomain.com/system/index.php</a>

    everything works as expected.
    Any idea what the problem could be?
    My htaccess:

    #force https
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # Remove trailing slash to prevent duplicate content
    RewriteCond %{HTTP_HOST} ^(www.)?mydomain\.eu$ [NC]
    RewriteCond %{THE_REQUEST} !/system/.*
    RewriteRule ^(.+)/$ <a href="http://mydomain.eu/$1">http://mydomain.eu/$1</a> [R=301,L]
    
    # Redirect index.php Requests
    # ------------------------------
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{THE_REQUEST} !/system/.*
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
    
    
    # Standard ExpressionEngine Rewrite
    # ------------------------------
    RewriteCond $1 !\.(css|js|gif|jpe?g|png|robots\.txt|favicon\.ico) [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]


    Thnx

  • #2 / Apr 22, 2012 11:16am

    soundseller

    52 posts

    It was some weird ssl certificate/Plesk problem.

  • #3 / Apr 23, 2012 11:41am

    Shane Eckert

    7174 posts

    Hey soundseller,

    I am glad to hear you were able to get this solved. I have heard of this before. Plesk does not play nice.

    If you need anything else, please just let us know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases