Emergency, hitting 'redirect to https killed my website'

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

http://efficiencyiseverything.com/

I ran this command:

./certbot-auto

It produced this output:

  • Congratulations!

My web server is (include version):

apache, wordpress.

The operating system my web server runs on is (include version):

ubuntu 16,

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I donā€™t know): yess

Iā€™m using a control panel to manage my site (no, or provide the name and version of the control panel): Filezilla

re-ran the usual renewal code , but today i hit ā€œ2.) redirect to HTTPSā€.

All of my interns went offline with the current:

This page isnā€™t working
efficiencyiseverything.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

I cannot figure out what file was modified. Maybe htaccess? I cannot get to wordpress either.

Does anyone know what exactly gets modified in my system or where I can find this in documentation?

It seems HTTP is redirecting to HTTPS (301).
And HTTPS is redirecting back to HTTP (302).
Endless loopā€¦

Is there a redirect in .htaccess that you can modify quickly?

grep -Eri 'rewrite|301|302' /etc/apache2 /var/www/html /etc/httpd

Options +FollowSymLinks



# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
    AddType text/css .css
    AddType text/x-component .htc
    AddType application/x-javascript .js
    AddType application/javascript .js2
    AddType text/javascript .js3
    AddType text/x-js .js4
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/vnd.ms-fontobject .eot
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType image/webp .webp
    AddType application/json .json
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/x-font-otf .otf
    AddType application/vnd.ms-opentype ._otf
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType image/svg+xml .svg .svgz
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType application/x-font-ttf .ttf .ttc
    AddType application/vnd.ms-opentype ._ttf
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/font-woff .woff
    AddType application/font-woff2 .woff2
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A31536000
    ExpiresByType text/x-component A31536000
    ExpiresByType application/x-javascript A31536000
    ExpiresByType application/javascript A31536000
    ExpiresByType text/javascript A31536000
    ExpiresByType text/x-js A31536000
    ExpiresByType video/asf A31536000
    ExpiresByType video/avi A31536000
    ExpiresByType image/bmp A31536000
    ExpiresByType application/java A31536000
    ExpiresByType video/divx A31536000
    ExpiresByType application/msword A31536000
    ExpiresByType application/vnd.ms-fontobject A31536000
    ExpiresByType application/x-msdownload A31536000
    ExpiresByType image/gif A31536000
    ExpiresByType application/x-gzip A31536000
    ExpiresByType image/x-icon A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType image/webp A31536000
    ExpiresByType application/json A31536000
    ExpiresByType application/vnd.ms-access A31536000
    ExpiresByType audio/midi A31536000
    ExpiresByType video/quicktime A31536000
    ExpiresByType audio/mpeg A31536000
    ExpiresByType video/mp4 A31536000
    ExpiresByType video/mpeg A31536000
    ExpiresByType application/vnd.ms-project A31536000
    ExpiresByType application/x-font-otf A31536000
    ExpiresByType application/vnd.ms-opentype A31536000
    ExpiresByType application/vnd.oasis.opendocument.database A31536000
    ExpiresByType application/vnd.oasis.opendocument.chart A31536000
    ExpiresByType application/vnd.oasis.opendocument.formula A31536000
    ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
    ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
    ExpiresByType application/vnd.oasis.opendocument.text A31536000
    ExpiresByType audio/ogg A31536000
    ExpiresByType application/pdf A31536000
    ExpiresByType image/png A31536000
    ExpiresByType application/vnd.ms-powerpoint A31536000
    ExpiresByType audio/x-realaudio A31536000
    ExpiresByType image/svg+xml A31536000
    ExpiresByType application/x-shockwave-flash A31536000
    ExpiresByType application/x-tar A31536000
    ExpiresByType image/tiff A31536000
    ExpiresByType application/x-font-ttf A31536000
    ExpiresByType application/vnd.ms-opentype A31536000
    ExpiresByType audio/wav A31536000
    ExpiresByType audio/wma A31536000
    ExpiresByType application/vnd.ms-write A31536000
    ExpiresByType application/font-woff A31536000
    ExpiresByType application/font-woff2 A31536000
    ExpiresByType application/vnd.ms-excel A31536000
    ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
</IfModule>
<FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header unset Set-Cookie
    </IfModule>
</FilesMatch>
<FilesMatch "\.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|TXT|XSD|XSL|XML)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header unset Set-Cookie
    </IfModule>
</FilesMatch>
<FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|WEBP|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
    <IfModule mod_headers.c>
         Header unset Last-Modified
    </IfModule>
</FilesMatch>
<IfModule mod_headers.c>
    Header set Referrer-Policy ""
</IfModule>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} =on
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC]
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wordpress/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
    RewriteRule .* "/wordpress/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN WordPress
<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

Rem these lines out and restart apache:

Now HTTPS is redirecting to HTTPS(301)ā€¦
Endless loop.

Find where your 443 vhost config is:

grep -Eri 'efficiencyiseverything.com|SSLCertificate' /etc/apache2 /var/www/html /etc/httpd

I tried removing those lines, it didnt solve the problem so I reverted back. I even deleted the entire htaccess file. Wordpress wouldnt load, but the root homepage still had the loop issue.

Iā€™m self host
/etc/apache2/sites-available/efficiencyiseverything.com.conf:# domain: efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf:# public: /var/www/efficiencyiseverything.c om/public_html/
/etc/apache2/sites-available/efficiencyiseverything.com.conf: ServerAdmin webmaster@efficiencyiseveryth ing.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf: ServerName www.efficiencyiseverything.co m
/etc/apache2/sites-available/efficiencyiseverything.com.conf: ServerAlias efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf: DocumentRoot /var/www/efficiencyiseveryth ing.com/public_html
/etc/apache2/sites-available/efficiencyiseverything.com.conf: ErrorLog /var/www/efficiencyiseverything .com/log/error.log
/etc/apache2/sites-available/efficiencyiseverything.com.conf: CustomLog /var/www/efficiencyiseverything .com/log/access.log combined
/etc/apache2/sites-available/efficiencyiseverything.com.conf:RewriteCond %{SERVER_NAME} =www.efficiencyi severything.com [OR]
/etc/apache2/sites-available/efficiencyiseverything.com.conf:RewriteCond %{SERVER_NAME} =efficiencyiseve rything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:# domain: efficiencyiseverything.co
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:# public: /var/www/efficiencyisevery thing.com/public_html/
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf: ServerAdmin webmaster@efficiencyis everything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf: ServerName www.efficiencyiseveryt hing.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf: ServerAlias efficiencyiseverything .com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf: DocumentRoot /var/www/efficiencyis everything.com/public_html
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf: ErrorLog /var/www/efficiencyiseve rything.com/log/error.log
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf: CustomLog /var/www/efficiencyiseve rything.com/log/access.log combined
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:SSLCertificateFile /etc/letsencrypt/ live/www.efficiencyiseverything.com/cert.pem
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:SSLCertificateKeyFile /etc/letsencry pt/live/www.efficiencyiseverything.com/privkey.pem
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:SSLCertificateChainFile /etc/letsenc rypt/live/www.efficiencyiseverything.com/chain.pem
/etc/apache2/sites-available/default-ssl.conf: # SSLCertificateFile directive is needed.
/etc/apache2/sites-available/default-ssl.conf: SSLCertificateFile /etc/ssl/certs/ssl-cert- snakeoil.pem
/etc/apache2/sites-available/default-ssl.conf: SSLCertificateKeyFile /etc/ssl/private/ssl-cert- snakeoil.key
/etc/apache2/sites-available/default-ssl.conf: # Point SSLCertificateChainFile at a file cont aining the
/etc/apache2/sites-available/default-ssl.conf: # the referenced file can be the same as SSLCe rtificateFile
/etc/apache2/sites-available/default-ssl.conf: #SSLCertificateChainFile /etc/apache2/ssl.crt/se rver-ca.crt
/etc/apache2/conf-available/servername.conf:ServerName www.efficiencyiseverything.com

Other things I can imagineā€¦

Its been years since I first built the website, might have used httpd.conf? It looks familiar. That or made changes directly to the apache settings.

Weird problem that seems almost impossible to root cause.

If it is wordpress you might have to update site links in the database to https it will show http://mysite.com but when switching to https it needs to be changed to https://mysite.com

It is in the ā€œwordpressā€ database in MySQL or if you custom set it up as something different

In the ā€œwp_optionsā€ table, look for ā€œsiteurlā€ and ā€œhomeā€

1 Like

You need to find where certbot made the redirectionā€¦
Find where your 443 vhost config is:
grep -Eri 'efficiencyiseverything.com|SSLCertificate' /etc/apache2 /var/www/html /etc/httpd

An easy wayā€¦

apache2ctl -S | grep -Eri rewrite

(Not sure if Eri should be addedā€¦ If not please correct me)

Thanks

1 Like

@stevenzhu good idea.
This should be enough:
apache2ctl -S | grep -i rewrite

On second thought, it may not show which file the rewrite line was in...
apache2ctl -S > /tmp/config.file
vi /tmp/config.file
and find "rewrite" then scroll up slowly looking for which file contains it.

[EDIT]
I think we may both be thinking about how NGINX shows the output.
Not sure apache will show what we are looking for (which file contains the rewrite).
This may come close enough:
apache2ctl -t -D DUMP_VHOSTS

If not, then try the long and hard way:

1 Like

I am trying to mess with the wp_options but Iā€™m running into two stupid problems. HediSQL on my windows isnt connecting, maybe I need to whitelist or SSH in, but I cant access it from there. Iā€™d simply mess with mysql, but when I select * from wp_options, Iā€™m getting too much text to put on the screen.

The long hard way results in:

/etc/apache2/sites-available/efficiencyiseverything.com.conf:# domain: efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf:# public: /var/www/efficiencyiseverything.com/public_html/
/etc/apache2/sites-available/efficiencyiseverything.com.conf:  ServerAdmin webmaster@efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf:  ServerName  www.efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf:  ServerAlias efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com.conf:  DocumentRoot /var/www/efficiencyiseverything.com/public_html
/etc/apache2/sites-available/efficiencyiseverything.com.conf:  ErrorLog  /var/www/efficiencyiseverything.com/log/error.log
/etc/apache2/sites-available/efficiencyiseverything.com.conf:  CustomLog /var/www/efficiencyiseverything.com/log/access.log combined
/etc/apache2/sites-available/efficiencyiseverything.com.conf:RewriteCond %{SERVER_NAME} =www.efficiencyiseverything.com [OR]
/etc/apache2/sites-available/efficiencyiseverything.com.conf:RewriteCond %{SERVER_NAME} =efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:# domain: efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:# public: /var/www/efficiencyiseverything.com/public_html/
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:  ServerAdmin webmaster@efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:  ServerName  www.efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:  ServerAlias efficiencyiseverything.com
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:  DocumentRoot /var/www/efficiencyiseverything.com/public_html
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:  ErrorLog  /var/www/efficiencyiseverything.com/log/error.log
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:  CustomLog /var/www/efficiencyiseverything.com/log/access.log combined
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:SSLCertificateFile /etc/letsencrypt/live/www.efficiencyiseverything.com/cert.pem
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:SSLCertificateKeyFile /etc/letsencrypt/live/www.efficiencyiseverything.com/privkey.pem
/etc/apache2/sites-available/efficiencyiseverything.com-le-ssl.conf:SSLCertificateChainFile /etc/letsencrypt/live/www.efficiencyiseverything.com/chain.pem
/etc/apache2/sites-available/default-ssl.conf:          #   SSLCertificateFile directive is needed.
/etc/apache2/sites-available/default-ssl.conf:          SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
/etc/apache2/sites-available/default-ssl.conf:          SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
/etc/apache2/sites-available/default-ssl.conf:          #   Point SSLCertificateChainFile at a file containing the
/etc/apache2/sites-available/default-ssl.conf:          #   the referenced file can be the same as SSLCertificateFile
/etc/apache2/sites-available/default-ssl.conf:          #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
/etc/apache2/conf-available/servername.conf:ServerName www.efficiencyiseverything.com

I came here from your HN post.

From the mysql console do a describe wp_options to show the columns. One will be called something like name or property or option etc.

Then use that to reduce your query

Select * from wp_options where name = 'siteurl' or name = 'home'

Change ā€œnameā€ to whatever the first non-integer column is called in the table

That is the file you need to look at:
/etc/apache2/sites-available/efficiencyiseverything.com.conf

Post the contents here if you are not sure what to remove.

Latest update, I modified my wp-config file and now the homepage loads. The rest of the pages are not loading and it seems the redirect still exists in wordpress.

Today I have also updated all http:/ to https:/ in both the database and many wordpress files. I can log in, but the wordpress dashboard isnt coming up. Very strange. the css on the non homepage cant be found either.

Where does certbot change redirects?

Here is a printout of that file, I did comment out the rewrite rule, did not seem to change anything.
# domain: efficiencyiseverything.com
# public: /var/www/efficiencyiseverything.com/public_html/

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin webmaster@efficiencyiseverything.com
  ServerName  www.efficiencyiseverything.com
  ServerAlias efficiencyiseverything.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/efficiencyiseverything.com/public_html
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/efficiencyiseverything.com/log/error.log
  CustomLog /var/www/efficiencyiseverything.com/log/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.efficiencyiseverything.com [OR]
RewriteCond %{SERVER_NAME} =efficiencyiseverything.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

That's the part that would have been added by Certbot.

2 Likes

It seems to be functional at this point.

http://efficiencyiseverything.com/ redirects to:
https://efficiencyiseverything.com/

and
http://www.efficiencyiseverything.com/ redirects to:
https://www.efficiencyiseverything.com/ which redirects to:
https://efficiencyiseverything.com/

Thats only the front page.

Wordpress is broken.

Seems css problems are common, I cannot tell if this is the only issue.

Finally solved.

  1. Following a tutorial I added a redirect similar to what certbot ads to my .htaccess. This redundancy was awful. Pestered until I finally deleted the code.

  2. I needed to update wp-options and wp-config to use https://website.com/wordpress/ A tutorial I used got rid of the use of /wordpress/ but this wasnt discovered until late.

Lots learned. I knew there was a loop, but wasnt sure what files were controlling and how.

The 3 files that ā€˜talkā€™ about routing are

/etc/apache2/sites-available/example.com.conf
/var/www/example.com/public_html/.htaccess
/var/www/example.com/public_html/(wordpress)/wp-config.php

Thank you for getting me to understand what was going on. Between this and PHP laravel, I feel like a wordpress wiz now :stuck_out_tongue_winking_eye:

2 Likes

Glad to hear it worked out