Hi @obsidianurbex and @clorith
This was VERY helpful! As it turns out, this is something of an obscure issue and there was not much online to solve this.
I had the EXACT same issue with the .htaccess code forcing the trailing slash. I had even put out my own ticket for it looking for answers, but then came across your post.
The only problem I’m having is that when I use the modified .htaccess code, the problem repeats itself. The ONLY way I’m able to publish or modify posts is by deleting the code from .htaccess.
Did you find a code that worked for the trailing slash and also allowed you to publish and update posts?
Edit:
I was able to find this code which worked just fine and allowed me to force the trailing slashes and still be able to post
# Force trailing slash
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|xml|txt|js|php|scss|webp|mp3|avi|wav|mp4|mov)$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301]
I found it here: https://docs.wp-rocket.me/article/131-redirection-to-enforce-trailing-slash-on-urls
Cheers
-
This reply was modified 5 years, 9 months ago by
mesotu.
-
This reply was modified 5 years, 9 months ago by
mesotu.