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
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    5,683
    Likes Received:
    1,055
    Best Answers:
    20
    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:
    85
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    53
    #5
    what CMS your using?
     
    Kaiti, Feb 20, 2018 IP
  6. mangobyte

    mangobyte Well-Known Member

    Messages:
    387
    Likes Received:
    7
    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