WordPress.org

Forums

How to force HTTPS to HTTP (5 posts)

  1. ruipdguerra
    Member
    Posted 1 year ago #

    I'm trying to force my website redirect from HTTPS to HTTP.
    I have this code in my htacces

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On	
    
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    </IfModule>
    # END WordPress

    And i already added the following pieces (none worked so far...)

    RewriteEngine On
         RewriteCond %{HTTPS} off
    RewriteCond %{HTTPS} on
         RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}
    RewriteCond %{SERVER_PORT} ^443$
         RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    Any ideas?

  2. neauxway
    Member
    Posted 1 year ago #

    try changing:
    RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}
    to
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

  3. alinford
    Member
    Posted 1 year ago #

    I have tried this, and https is still not redirecting to http.
    Any other ideas?

    Here is what I have:

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index1.php [L]
    </IfModule>
  4. wingerter
    Member
    Posted 11 months ago #

    I have the same problem. It's not redirecting from https to http. I have this:

    RewriteEngine On
    <IfModule mod_rewrite.c>
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
    
    # force all URLs from https to http
    RewriteCond %{HTTP_HOST} !^$
    RewriteCond %{HTTP_HOST} !^blog\. [NC]
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://blog.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
    </IfModule>
  5. wingerter
    Member
    Posted 6 months ago #

    still not working...

Topic Closed

This topic has been closed to new replies.

About this Topic