Answers.Body: <p>It turned out <strong>not to be Craft's fault</strong>, indeed: </p>
  
  <p>On the server, the <code>HTTP_X_FORWARDED_PROTO</code> environment variable was erroneously set to <code>https</code> in the reverse proxy – an issue that my hosting provider had to resolve.</p>
  
  <p>(As a quick fix, the following line in <code>index.php</code> did the trick, too:)</p>
  
  <pre><code> apache_setenv('HTTP_X_FORWARDED_PROTO', 'http');
  </code></pre>
  
  <p>Thanks to @brad-bell and @ritterknight for pointing in the right direction!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-15T16:33:48.317Z
Answers.Text: Glad to hear you got it sorted. Those sorts of problems can be maddening...
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-15T16:07:50.587Z
Answers.LastActivityDate: 2015-09-15T16:07:50.587Z
Answers.UserDisplayName: Avant la lettre
Body: <p>On one Craft CMS site I have, all control panel URLs I call over HTTP are rewritten to HTTPS. E.g. the login page, as well as all its assets, are being served via <code>https://www.mywebsite.com/admin/…</code>.</p>
  
  <p>The rest of the site is available via <code>https://www.mywebsite.com/</code></p>
  
  <p>I've already tried to enforce HTTP via mod.rewrite in .htaccess, as well as explicitly setting <code>baseCpUrl</code> and an new <code>cpTrigger</code> in <code>config/general</code> – with no success at all.</p>
  
  <p>Is this a feature that I can deactivate? A bug in Craft CMS 2.4.2670?<br>
  Or is this a server-side issue?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-11T15:57:27.627Z
Comments.Text: This is going to be something on the server side.  Maybe share your `.htaccess` file as well as what's in your `craft/config/general.php` file?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-12T00:13:13.187Z
Comments.Text: At first, I blamed the server, too, since my other Craft instances on other servers work flawlessly. But: why only the control panel, not the main site? How can one trigger a different protocol than the other? Anyway, here are my current .htaccess and config/general.php files: http://avantlalettre.ch/files/htaccess.txt ; http://avantlalettre.ch/files/config-general.txt — Thanks for checking it out!
Comments.UserDisplayName: Avant la lettre
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-12T04:51:57.060Z
Comments.Text: Try removing everything after `RewriteRule (.+) index.php?p=$1 [QSA,L]` in your `.htaccess` file and see if that helps.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-14T04:55:53.003Z
Comments.Text: So the server is switching to https and you want http instead?   That won't happen automatically since you'd need a certificate, server config, etc.  Sounds like there's more directives in apache's config/virtual host config.. Who runs your server? That's where I'd start...
Comments.UserDisplayName: RitterKnight
Tags: <control-panel><admin><https><ssl>
Title: Control panel switches to HTTPS protocol on its own
ThreadText: # Control panel switches to HTTPS protocol on its own
  
  (Asked by: username_0 on 2015-09-11)
  
  On one Craft CMS site I have, all control panel URLs I call over HTTP are rewritten to HTTPS. E.g. the login page, as well as all its assets, are being served via `https://www.mywebsite.com/admin/…`.
  
  The rest of the site is available via `https://www.mywebsite.com/`
  
  I've already tried to enforce HTTP via mod.rewrite in .htaccess, as well as explicitly setting `baseCpUrl` and an new `cpTrigger` in `config/general` – with no success at all.
  
  Is this a feature that I can deactivate? A bug in Craft CMS 2.4.2670?  
  Or is this a server-side issue?
  
  **Tags:** control-panel, admin, https, ssl
  
  > **Comments:**
  > **username_1**: This is going to be something on the server side.  Maybe share your `.htaccess` file as well as what's in your `craft/config/general.php` file?  
  > **username_0**: At first, I blamed the server, too, since my other Craft instances on other servers work flawlessly. But: why only the control panel, not the main site? How can one trigger a different protocol than the other? Anyway, here are my current .htaccess and config/general.php files: http://username_0.ch/files/htaccess.txt ; http://username_0.ch/files/config-general.txt — Thanks for checking it out!  
  > **username_1**: Try removing everything after `RewriteRule (.+) index.php?p=$1 [QSA,L]` in your `.htaccess` file and see if that helps.  
  > **username_2**: So the server is switching to https and you want http instead?   That won't happen automatically since you'd need a certificate, server config, etc.  Sounds like there's more directives in apache's config/virtual host config.. Who runs your server? That's where I'd start...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-09-15. Score: 1 | Accepted answer
  
  It turned out **not to be Craft's fault**, indeed:
  
  On the server, the `HTTP_X_FORWARDED_PROTO` environment variable was erroneously set to `https` in the reverse proxy – an issue that my hosting provider had to resolve.
  
  (As a quick fix, the following line in `index.php` did the trick, too:)
  
  ```
   apache_setenv('HTTP_X_FORWARDED_PROTO', 'http');
  
  ```
  
  Thanks to @username_1 and @username_2 for pointing in the right direction!
  
  > **Comments:**
  > **username_2**: Glad to hear you got it sorted. Those sorts of problems can be maddening...  
  
  ---
  
  