Site icon Hip-Hop Website Design and Development

WordPress is removing trailing slash

Unfortunately, it seems I have a misconfiguration in my wordpress instance. WordPress seems to remove the trailing slash. This only happens when the domain is accessed via www.

When I open http://schwelme.de/merkzettel/, everything seems to work. However, when I open http://www.schwelme.de/merkzettel/, the trailing slash is removed.

My .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.schwelme.de$
RewriteRule ^(.*)$ https://www.schwelme.de/$1 [R=301,L]

The root domain is set to https://www.schwelme.de. The permalink structure is set to https://schwelme.de/%postname%/.

Edit: The problem seems to occur only when I call the domain via http. If I call it encrypted, there is no problem.