WP-Admin Trailing Slash Problem

I had this WordPress wp-admin trailing slash problem for a couple of weeks now. When I don’t include a trailing slash after the wp-admin directory when logging in to WordPress, I will get a 404 missing page error. It’s a little annoying if you ask me, but it doesn’t really affect blog readers. It only shows up if you want to login to the WordPress Dashboard, and you forget to type the trailing slash at the end of wp-admin. Example below.

site.com/wp-admin/ <– this redirects to the WordPress login ok.
site.com/wp-admin <– this will result in a 404 missing page error.

So, I tried a couple of suggestions I found online, but the suggested changes to the .htaccess file didn’t seem to fix the issue. A couple of occasions, the suggestions were exactly the same code I already had in my .htaccess file. So, I tried a couple more suggestions. I noticed one blog post┬áhad a couple more lines in the .htaccess file that I haven’t seen in mine. So, I tried it and it worked. So, here are the changes I made.

I added these two lines to my .htaccess.

RewriteEngine On
RewriteBase /

I think the key code is in the second line. It basically establishes the base URL.