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
    SEMrush
    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
    Code (markup):
     
    khalled1, Jan 22, 2018 IP
    SEMrush
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    5,853
    Likes Received:
    1,085
    Best Answers:
    22
    Trophy Points:
    400
    #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:
    102
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    68
    #5
    what CMS your using?
     
    Kaiti, Feb 20, 2018 IP
  6. mangobyte

    mangobyte Well-Known Member

    Messages:
    390
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #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:
    411
    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 Member Premium Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    33
    #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