I've searched around quite a bit for a solution here, but I can't find anything. I apologize if this is too technical for the forum.
I have a Wordpress site hosted on Nginx by WP Engine. Currently it resolves requests to URLs either with or without a trailing slash.
So, both of these URLs are functional:
<code>mysite.com/single-post</code>
and
<code>mysite.com/single-post/</code>
I would like to remove the trailing slash from all posts, forcing mysite.com/single-post/
to redirect to mysite.com/single-post
. I created a redirect rule on the server:
^/(.*)/$ -> /$1
and this worked well for end-users, but rendered the admin panel inaccessible. Somewhere, Wordpress is adding a trailing slash back on to the URL mysite.com/wp-admin
, resulting in a redirect loop. I can't see anything obvious in .htaccess.
Where is this rule adding a trailing slash to 'wp-admin' established?
Thanks very much