I have a fresh install of Bedrock which is redirecting www.url.com/wp-admin to www.url.com/wp/wp-admin. For the benefit of obscurity, I would prefer to have to specifically type /wp/wp-admin to access the admin panel.
Iād like to see if there is a non-plugin way to achieve this (so that I can keep the number of plugins to a minimum).
Especially since it appears that in the past, by default, a Bedrock install would require that the /wp/ was required to be specifically typed in the URL path to access wp-admin.
I looked into it, and it does seem like that would achieve what I am looking for, but if I were to use the following code: remove_filter('template_redirect', 'redirect_canonical');
This would also turn off the useful ability for WordPress to redirect users to the closest matching pages across the entire site.
I read that I can do page-by-page special redirect rules, however I am worried that may introduce more problems into my setup as I am not proficient in PHP.
I am left wondering how the original behaviour (no wp-admin redirect to /wp/wp-admin) in Bedrock was accomplished, because in the link that I highlighted above it appears not having a redirect was the default behaviour.
This has got me curious whether:
Originally in Bedrock redirects were off for the entire WordPress site?
Or they had custom code to prevent that specific redirect on wp-admin?
Or at some point between now and 2014 it was decided that redirecting wp-admin to /wp/wp-admin was a good idea (even though no-redirect added a slight benefit to security - as highlighted by a Roots dev in the post I found and linked above)