I have a WordPress instance running via http-proxy-middleware, so I can have my WordPress blog under example/blog
The problem I'm struggling with is I cannot configure the .htaccess
file properly.
Here's my config:
<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>
By default, WordPress generates all links without the trailing slash.
I can access the following:
example/blog/wp-login.php
example/blog/wp-admin/
example/blog/wp-admin/index.php
But when I go to example/blog/wp-admin
(no trailing slash) the redirection fails.
Same happens when I manually add the trailing slash to a post link:
example/blog/testing
works
example/blog/testing/
fails
I wonder if I should focus on the http-proxy-middleware
configuration or could it be that my .htaccess
file is configured incorrectly?