My WordPress in installed in a folder, https://example.com/folder/. I would like WP index page to get accessed by https://example.com/folder, however, WP 301 redirects it to https://example.com/folder/.

What do I need to do to get no trailing slash and no redirects when accessing https://example.com/folder?


In your .htaccess file you could try this below the RewriteEngine On line

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

Taken from: https://stackoverflow.com/questions/21417263/htaccess-add-remove-trailing-slash-from-url

  • I've tried it before, doesn't work – CamSpy Aug 30 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.