Http to https forwarding issues (htaccess changed automatically)


#1

Hi everyhone

My podcast is running on Publisher 2.8.0.build531 and https. My goal is to forward http requests to the equivalent https page.
Example: gametalk.fm/archiv and http://gametalk.fm/archiv should both redirect to https://gametalk.fm/archiv.

I recently found, that my forwarding stopped working. With the help of @Loewe88, I set up the htaccess file manually by adding a few lines. Before, I was using a web-tool provided by my host - that didn’t work. In the end, the WordPress part did look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule (.*) https://gametalk\.fm%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

This was working fine for a few days.

Today, my static WordPress pages (not individual podcast episode pages) stopped loading: “Too many redirects” (Google Chrome 65, Windows 10).
I had this issue before. It happened from time to time. The solutions is always the same:
Podlove -> Tools -> Repair button.
Now the affected pages are loading again. But:

I noticed that my https redirect was gone. I checked my htaccess file. It now looks like this:

# 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

Yes, the redirect is gone.

How can I keep this from happening? I don’t fancy fixing this by hand once a week…

Website                    https://GameTalk.FM
PHP Version                7.0.29
WordPress Version          4.9.5
WordPress Theme            Joeys Twenty Fifteen Child v1.0
Active Plugins             
           - Akismet Anti-Spam v4.0.3
           - Limit Login Attempts v1.7.1
           - Podlove Beta Tester v1.1.3
           - Podlove Podcast Publisher v2.8.0.build531
           - Yoast SEO v7.4.2
WordPress Database Charset utf8
WordPress Database Collate 
Publisher Version          2.8.0.build531
Web Player Version         player_v4
Twig Version               1.35.3
open_basedir               ok
curl Version               7.54.0
iconv                      available
simplexml                  ok
max_execution_time         50
upload_max_filesize        100M
memory_limit               256M
disable_classes            
disable_functions          exec, shell_exec, system, dl, passthru, proc_open, proc_close
permalinks                 ok (/%postname%/)
podlove_permalinks         ok
podcast_settings           ok
web_player                 ok
podlove_cache              on
assets                     
  - mp3    audio/mpeg       https://GameTalk.FM/feed/mp3/
  - m4a    audio/mp4        https://GameTalk.FM/feed/m4a/
cron                       ok

0 errors
0 notices
Nice, Everything looks fine!

#2

Update:
I’ve simply set my .htaccess file to read-only. This does prevent the Podlove repair button from deleting the https to http forward. Everything is working fine now.