htaccess – WordPress is removing trailing slash

Question

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%/.

0
Jonas 5 months 2022-02-01T08:58:02-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse