Navigation

    • Register
    • Login
    • Search
    • Recent
    • Users
    • Groups

    Redirect from https to http.

    CWP - Panel
    3
    12
    118
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JosePP
      JosePP last edited by sandeep

      Hi Sandeep, we have a client with CWP that wants to redirect a domain from https to http, in CWP it has been practically impossible for us, we fall into a redirection loop. Is there any trick to do it in CWP?

      Greetings!

      1 Reply Last reply Reply Quote 0
      • gpl.one
        gpl.one last edited by

        Hey @JosePP,

        It's very simple, just use a config on the WebServer for the domain without HTTPS, so the webserver is open to 2 protocols (HTTP / HTTPS).

        Then just add a redirect to htaccess, with code like this:

        RewriteEngine On
        RewriteCond %{HTTPS} on
        RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
        
        JosePP 1 Reply Last reply Reply Quote 1
        • JosePP
          JosePP @gpl.one last edited by

          @gpl-one Hello!

          I thought that was easy, until I came across this problem at CWP hahaha

          I have exactly the same code that you tell me and CWP ignores it completely, look:

          1: https://i.gyazo.com/d8465e868020bbe6725146a50011ac53.png
          2: https://i.gyazo.com/5b03bd40df595cfcd2daa4794677f26b.png
          3: Web: https://i.gyazo.com/76cda8f431f2d61038bee05191d8739b.png

          I thought it was fine, besides, my code is very similar to yours, but it doesn't listen to me.

          What am I doing wrong?

          gpl.one 1 Reply Last reply Reply Quote 0
          • sandeep
            sandeep last edited by

            probably cache ? its better to check http headers if its redirecting to http.

            JosePP 1 Reply Last reply Reply Quote 0
            • JosePP
              JosePP @sandeep last edited by

              @sandeep said in Redirig from https to http.:

              check http headers

              https://i.gyazo.com/0443670e403a070a98a996f065293d8b.png

              According to this tool it does not seem to be caching.

              I open it from tor and it does not redirect me either.

              1 Reply Last reply Reply Quote 0
              • sandeep
                sandeep last edited by sandeep

                cache can be your browser, seems you're getting 200 status code the redirect is not working. You also need to edit your site URL settings.

                1 Reply Last reply Reply Quote 0
                • gpl.one
                  gpl.one @JosePP last edited by

                  Hey @JosePP

                  I checked your site and it is working as I had spoken with the 2 protocols working without redirect.

                  • https://prnt.sc/v0xcuq

                  I think there must be a problem using the {HTTP_HOST} and {REQUEST_URI} variables on your server.

                  You can try to declare the URL directly without using apache variables, like this:

                  RewriteEngine On
                  RewriteCond %{HTTPS} on
                  RewriteRule ^(.*)$ http://inprenta.eus/$1 [L,R=301]
                  

                  After inserting the code, restart the Web Server and try to access the site in an anonymous tab in your browser, I think it should work that way.

                  JosePP 1 Reply Last reply Reply Quote 1
                  • JosePP
                    JosePP @gpl.one last edited by

                    @gpl-one Nothing, I don't understand why he doesn't listen to me... I'm already bored with the problem. hahahaha

                    sandeep 1 Reply Last reply Reply Quote 0
                    • sandeep
                      sandeep @JosePP last edited by

                      @JosePP said in Redirect from https to http.:

                      @gpl-one Nothing, I don't understand why he doesn't listen to me... I'm already bored with the problem. hahahaha

                      👽 you've other planet issues 🙏

                      gpl.one JosePP 2 Replies Last reply Reply Quote 1
                      • gpl.one
                        gpl.one @sandeep last edited by

                        @sandeep Probably 😂

                        1 Reply Last reply Reply Quote 0
                        • JosePP
                          JosePP @sandeep last edited by

                          @sandeep I opened this ticket today, if you want to see it. Let's see if you know why I'm going crazy hahaha ( #891343 )

                          sandeep 1 Reply Last reply Reply Quote 0
                          • sandeep
                            sandeep @JosePP last edited by

                            @JosePP I've replied to your new ticket, the solution is provided there.

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            Recent Topics

                            • is ngx_pagespeed works?

                            • How to add a new disk?

                            • Module IPv6 CWP

                            • PHP 8.0.0 testing - CWP

                            • Serious error with quotas

                            • Centos 8 Stream CWP - Delayed Update and CWP repositories are added

                            • Update NGINX Stable v1.16.1 to latest NGINX Stable v1.18.0 for CWP & CWP PRO!

                            • Phpmyadmin New Verison with autologin - CWP

                            URLs HOME | Blog | Support Portal