• Good day all you fellow WordPress patrons. I have a weird issue which I have never experienced while using c panel and WordPress in the last 10 years.

    I have a website that has been set up for a few years on a c panel VPS server. Just recently, the site wont redirect from https://www.site.com or https://site.com to https://. The site works perfect if going to directly https://site.com. I did not change anything in WordPress and the site is set up correctly as I have done this time and time again and never had any issues like this. htaccess file also shows set up correctly and in c panel, under SSL, all green, and domains shows on for force ssl.

    I have tried everything, when going to the site via http or https://www.site.com, it shows default c panel page.

    SORRY!

    If you are the owner of this website, please contact your hosting provider: [email protected]
    It is possible you have reached this page because:

    No issues or errors showing in WHM or even WordPress, everything I can do to redirect I have tried. Not cache issue either as I did everything IO could with this as well such as deleting cache, folder, different browser, etc. I am really stumped. DNS shows no errors, just weird and I really need one of you smart people to help me please.

    Thanks,

    Steve

    • This topic was modified 2 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter 360webfirm

    (@360webfirm)

    I have added this in my htaccess and all SSL is verified to be working, but the redirect from https://www.site.co, or https://site.com is still not working at all. Yes I changed the url to my domain ??

    RewriteEngine On 
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L,NE]
    Header always set Content-Security-Policy "upgrade-insecure-requests;"
    
    # BEGIN WordPress
    # The directives (lines) between <code>BEGIN WordPress</code> and <code>END WordPress</code> are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Please help

    Add this, it should work.

    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP:X-Forwarded-SSL} !on
    RewriteCond %{HTTPS} !=on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://exemple.com/$1 [R=301,L]
    # Redirect www to non-www
    RewriteCond %{HTTP_HOST} ^www\. [NC]
    RewriteRule ^(.*)$ https://exemple.com/$1 [R=301,L]
    
    RewriteRule ^www\.site\.com$ “https\:\/\/site\.com\/” [R=301,L]
    Thread Starter 360webfirm

    (@360webfirm)

    I will try it but I have tried a LOT of redirect rules and I even took wordpress right out of the equation with just a index.html file and still no go.

    Thread Starter 360webfirm

    (@360webfirm)

    Just get this
    SORRY!
    If you are the owner of this website, please contact your hosting provider: webmaster@******

    It is possible you have reached this page because:

    I think this is something to do with C panel as it started I think when I added an add on domain if I recall. Site works perfect if going to directly using any https://

    • This reply was modified 2 years, 7 months ago by 360webfirm.

    You can follow this tutorial, it only takes 3 minutes, maybe it helps, if not, my advice is to write on the cPanel team forum: https://forums.cpanel.net/

    Thread Starter 360webfirm

    (@360webfirm)

    I appreciate your response, but that was one of the first things I checked and this website was runnign perfetcly fine for a few years without no issues until recently.

    Thread Starter 360webfirm

    (@360webfirm)

    SOLUTION found thank goodness and thanks to C Panel Support team!

    For anyone else that experiences this issue using WordPress with VPS Hosting and C Panel is this resolution which helped me.

    Domain or Subdomain is missing from Apache conf

    • This reply was modified 2 years, 7 months ago by 360webfirm.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wont redirct to https:// no matter what I do.’ is closed to new replies.