Skip to main content

301 Redirect Error

Comments

7 comments

  • ffeingol
    I can't tell you what your error is, but I would not suggest forcing https redirect with the cPanel redirects. You'll end up with a loop if someone is already accessing it via https. We suggest code like this: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
    0
  • jdn1976
    ffeingol as you instrutions: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ www.example.com.br it opens normal and redirect to UptimeRobot | Free Website Monitoring) to monitor the HTTP service, and when I always add the code to redirect using .htaccess the uptime robot says http is down.
    0
  • ffeingol
    Are you 100% sure that both example.com.br and www.example.com.br both resolve your your server (i.e. no DNS issue)? Is there anything else in the .htaccess file other than this code?
    0
  • jdn1976
    Hello, I have checked on: intoDNS: checks DNS and mail servers health and there is no error on DNS entries. my .htaccess: RewriteOptions inherit # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php72" package as the default "PHP" programming language. AddHandler application/x-httpd-ea-php72 .php .php7 .phtml # php -- END cPanel-generated handler, do not edit RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ My Title | Example ...
    0
  • cPRex Jurassic Moderator
    Are you using software like WordPress or something similar? If so, I have found that a plugin that handles https redirection works better than trying to use .htaccess.
    0
  • jdn1976
    Yes, it is WordPress.
    0
  • cPRex Jurassic Moderator
    I've had good luck with this tool:
    0

Please sign in to leave a comment.