1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

redirect all HTTPs URL requests to HTTP URL

Discussion in 'Security' started by khalled1, Jan 22, 2018.

  1. #1
    i stop SSL certificate in my web site and i want to redirect all HTTPs URL requests to HTTP URL
    i try the following code in .htaccess but it not running with me

    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
    Code (markup):

     
    khalled1, Jan 22, 2018 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #2
    qwikad.com, Jan 22, 2018 IP
  3. khalled1

    khalled1 Member

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    Many thanks for your help , but unfortunately the two codes not succeeds
     
    khalled1, Jan 23, 2018 IP
  4. Glombers

    Glombers Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    Or
    server {
        listen 80;
        server_name your_site_name.com;
    
        return 302 https://$server_name$request_uri;
    }
    Code (ApacheConf):
     
    Glombers, Feb 10, 2018 IP
  5. Kaiti

    Kaiti Active Member

    Messages:
    123
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    68
    #5
    what CMS your using?
     
    Kaiti, Feb 20, 2018 IP
  6. mangobyte

    mangobyte Well-Known Member

    Messages:
    433
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Try following lines in .htaccess (Replace yourdomain with your actual website name)
    RewriteEngineOn
    RewriteCond%{HTTP_HOST}^yourdomain\.com[NC]
    RewriteCond%{SERVER_PORT}80
    RewriteRule^(.*)$http://www.yourdomain.com/$1 [R,L]
    Code (markup):
     
    mangobyte, Feb 5, 2019 IP
  7. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #7
    The above given htaccess code is correct I guess there is still an entry present in your Apache config file which is listening 443 port.
     
    hostechsupport, Feb 21, 2019 IP
  8. bountysite

    bountysite Active Member

    Messages:
    71
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    73
    #8
    Do you really want to disable SSL?

    What does not succeed not mean?
    • Page redirects but does not open http URL? - this means port 80 is not open
    • Page stays at https:-
      • check location of your .htacess file. It should be inside Docroot, which is usually /public_html
      • are you on shared hosting?
      • Is there an existing .htaccess file?
      • What is the URI?
      • What CMS are you using?
     
    bountysite, Feb 21, 2019 IP