Remove Trailing Slash From Root WP Directory


I have WP installed in a directory above the domain ( example )

I want the WP index page to get accessed without the trailing slash ( example ).

WP by default is doing a 301 redirect to

I have tried the following with no resolution:

1) Set the Permalinks setting to: /%postname% My canonical is correct and showing but it is still 301 redirecting to

2) Edited the .htaccess file to:

RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)/$ /$1 [L,R]

3) Removed the redirect_canonical() filter from functions.php:

add_filter('template_redirect', 'redirect_canonical');
, Juan Cullen 3 years 2020-06-08T05:10:27-05:00 0 Answers 100 views 0

Leave an answer