I was using a default generated admin URL on our dev site, and I wanted to change the admin URL to something custom. After doing changing it on the admin side, I was no longer able to access admin and got a 404 redirect error. After trying to change it via CLI, trying to recompile and redeploy, and other steps, now when trying to access the admin URL, it gives a redirected too many times error, and also appends the admin link over and over again.
example localhost/admin => localhost/admin/admin/admin/admin/admin../admin
What can I do to fix this?